File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
android/src/main/java/com/textinput Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,24 @@ import androidx.annotation.Nullable
1010import com.facebook.react.uimanager.UIManagerHelper
1111import com.facebook.react.views.textinput.ReactEditText
1212import so.onekey.app.wallet.pasteinput.PasteWatcher
13+ import android.view.Gravity
1314
1415class TextInputView (context : Context ) : ReactEditText(context) {
1516
1617 private var mPasteWatcher: PasteWatcher ? = null
1718
19+ init {
20+ includeFontPadding = false
21+ }
22+
23+ override fun scrollTo (x : Int , y : Int ) {
24+ if (gravity and Gravity .VERTICAL_GRAVITY_MASK == Gravity .CENTER_VERTICAL ) {
25+ super .scrollTo(x, 0 )
26+ } else {
27+ super .scrollTo(x, y)
28+ }
29+ }
30+
1831 override fun onTextContextMenuItem (id : Int ): Boolean {
1932 if (id == android.R .id.paste || id == android.R .id.pasteAsPlainText) {
2033 if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .M ) {
Original file line number Diff line number Diff line change 11{
22 "name" : " @onekeyfe/react-native-text-input" ,
3- "version" : " 0.2.8 " ,
3+ "version" : " 0.2.9 " ,
44 "description" : " text-input" ,
55 "source" : " ./src/index.tsx" ,
66 "types" : " ./lib/typescript/src/index.d.ts" ,
You can’t perform that action at this time.
0 commit comments