@@ -38,6 +38,7 @@ import KeyboardManager, { PreviousNextView } from 'react-native-keyboard-manager
38
38
KeyboardManager . setEnable ( true ) ;
39
39
KeyboardManager . setEnableDebugging ( true ) ;
40
40
KeyboardManager . setKeyboardDistanceFromTextField ( 30 ) ;
41
+ KeyboardManager . setLayoutIfNeededOnUpdate ( true ) ;
41
42
KeyboardManager . setEnableAutoToolbar ( true ) ;
42
43
KeyboardManager . setToolbarDoneBarButtonItemText ( "Done" ) ;
43
44
KeyboardManager . setToolbarManageBehaviourBy ( "subviews" ) ; // "subviews" | "tag" | "position"
@@ -120,28 +121,28 @@ class App extends Component {
120
121
return (
121
122
< View style = { { flex : 1 } } >
122
123
< SafeAreaView style = { { flex : 1 } } >
123
- { /* To try with Modal, uncomment the two following lines. */ }
124
- { /* <Modal visible={true}> */ }
125
- { /* <PreviousNextView style={{ flex: 1 }}> */ }
124
+ { /* To try with Modal, uncomment the two following lines. */ }
125
+ { /* <Modal visible={true}> */ }
126
+ { /* <PreviousNextView style={{ flex: 1 }}> */ }
126
127
127
- { /* ScrollView is not required, but may be needed in some cases. */ }
128
- < ScrollView >
128
+ { /* ScrollView is not required, but may be needed in some cases. */ }
129
+ < ScrollView >
129
130
130
- < View style = { { alignItems : "center" } } >
131
+ < View style = { { alignItems : "center" } } >
131
132
< Text style = { { marginTop : 10 , textAlign : "center" } } > React-Native Keyboard Manager</ Text >
132
- < View style = { { marginTop : 10 , flexDirection : "row" , alignItems : "center" } } >
133
- < Text > Enable/Disable </ Text >
134
- < Switch onValueChange = { this . onEnableDisable }
135
- value = { this . state . enableDisable } />
133
+ < View style = { { marginTop : 10 , flexDirection : "row" , alignItems : "center" } } >
134
+ < Text > Enable/Disable </ Text >
135
+ < Switch onValueChange = { this . onEnableDisable }
136
+ value = { this . state . enableDisable } />
137
+ </ View >
136
138
</ View >
137
- </ View >
138
139
139
- < View > { inputs } </ View >
140
+ < View > { inputs } </ View >
140
141
141
- </ ScrollView >
142
+ </ ScrollView >
142
143
143
- { /* </PreviousNextView> */ }
144
- { /* </Modal> */ }
144
+ { /* </PreviousNextView> */ }
145
+ { /* </Modal> */ }
145
146
</ SafeAreaView >
146
147
</ View >
147
148
)
0 commit comments