-
-
Notifications
You must be signed in to change notification settings - Fork 152
Expand file tree
/
Copy pathKeyboardControllerModule.kt
More file actions
53 lines (41 loc) · 1.31 KB
/
KeyboardControllerModule.kt
File metadata and controls
53 lines (41 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package com.reactnativekeyboardcontroller
import com.facebook.react.bridge.Promise
import com.facebook.react.bridge.ReactApplicationContext
import com.reactnativekeyboardcontroller.modules.KeyboardControllerModuleImpl
class KeyboardControllerModule(
mReactContext: ReactApplicationContext,
) : NativeKeyboardControllerSpec(mReactContext) {
private val module = KeyboardControllerModuleImpl(mReactContext)
override fun getName(): String = KeyboardControllerModuleImpl.NAME
override fun getTypedExportedConstants(): Map<String, Any> = module.getConstants()
override fun setInputMode(mode: Double) {
module.setInputMode(mode.toInt())
}
override fun setDefaultMode() {
module.setDefaultMode()
}
override fun preload() {
module.preload()
}
override fun dismiss(
keepFocus: Boolean,
animated: Boolean,
) {
module.dismiss(keepFocus, animated)
}
override fun setFocusTo(direction: String) {
module.setFocusTo(direction)
}
override fun viewPositionInWindow(
viewTag: Double,
promise: Promise,
) {
module.viewPositionInWindow(viewTag, promise)
}
override fun addListener(eventName: String?) {
// Required for RN built-in Event Emitter Calls.
}
override fun removeListeners(count: Double) {
// Required for RN built-in Event Emitter Calls.
}
}