Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: move all interactive keyboard code to dedicated interactive folder (Android) #353

Merged
merged 12 commits into from
Feb 4, 2024
Merged
7 changes: 7 additions & 0 deletions .github/workflows/android-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ jobs:
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# force to remove default tools
tool-cache: true
# preserve Android
android: false
- uses: actions/setup-node@v4
with:
node-version: 18.x
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reactnativekeyboardcontroller
package com.reactnativekeyboardcontroller.interactive

object InteractiveKeyboardProvider {
var shown = false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reactnativekeyboardcontroller
package com.reactnativekeyboardcontroller.interactive

import android.os.CancellationSignal
import android.view.View
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reactnativekeyboardcontroller.interpolators
package com.reactnativekeyboardcontroller.interactive.interpolators

interface Interpolator {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reactnativekeyboardcontroller.interpolators
package com.reactnativekeyboardcontroller.interactive.interpolators

class IosInterpolator : Interpolator {
override fun interpolate(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reactnativekeyboardcontroller.interpolators
package com.reactnativekeyboardcontroller.interactive.interpolators

class LinearInterpolator : Interpolator {
override fun interpolate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.uimanager.UIManagerHelper
import com.facebook.react.views.textinput.ReactEditText
import com.facebook.react.views.view.ReactViewGroup
import com.reactnativekeyboardcontroller.InteractiveKeyboardProvider
import com.reactnativekeyboardcontroller.events.KeyboardTransitionEvent
import com.reactnativekeyboardcontroller.extensions.dispatchEvent
import com.reactnativekeyboardcontroller.extensions.dp
import com.reactnativekeyboardcontroller.extensions.isKeyboardAnimation
import com.reactnativekeyboardcontroller.interactive.InteractiveKeyboardProvider
import kotlin.math.abs

private val TAG = KeyboardAnimationCallback::class.qualifiedName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.facebook.react.uimanager.ThemedReactContext
import com.facebook.react.views.view.ReactViewGroup
import com.reactnativekeyboardcontroller.KeyboardAnimationController
import com.reactnativekeyboardcontroller.extensions.copyBoundsInWindow
import com.reactnativekeyboardcontroller.interpolators.Interpolator
import com.reactnativekeyboardcontroller.interpolators.IosInterpolator
import com.reactnativekeyboardcontroller.interpolators.LinearInterpolator
import com.reactnativekeyboardcontroller.interactive.KeyboardAnimationController
import com.reactnativekeyboardcontroller.interactive.interpolators.Interpolator
import com.reactnativekeyboardcontroller.interactive.interpolators.IosInterpolator
import com.reactnativekeyboardcontroller.interactive.interpolators.LinearInterpolator
import kotlin.math.absoluteValue
import kotlin.math.roundToInt

Expand Down