File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
demo/src/screens/nativeComponentScreens/keyboardInput Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
1
import React , { Component } from 'react' ;
2
2
import PropTypes from 'prop-types' ;
3
- import { Keyboard , Colors } from 'react-native-ui-lib' ;
3
+ import { Keyboard , Colors , Constants } from 'react-native-ui-lib' ;
4
4
const KeyboardRegistry = Keyboard . KeyboardRegistry ;
5
5
import KeyboardView from './KeyboardView' ;
6
6
@@ -11,7 +11,7 @@ class KeyboardView1 extends Component {
11
11
12
12
onButtonPress ( ) {
13
13
KeyboardRegistry . onItemSelected ( 'KeyboardView1' , {
14
- message : 'item selected from KeyboardView '
14
+ message : 'Item selected from keyboard 1 '
15
15
} ) ;
16
16
}
17
17
@@ -33,7 +33,13 @@ class KeyboardView2 extends Component {
33
33
} ;
34
34
35
35
onButtonPress ( ) {
36
- KeyboardRegistry . toggleExpandedKeyboard ( 'KeyboardView2' ) ;
36
+ if ( Constants . isIOS ) {
37
+ KeyboardRegistry . toggleExpandedKeyboard ( 'KeyboardView2' ) ;
38
+ } else {
39
+ KeyboardRegistry . onItemSelected ( 'KeyboardView2' , {
40
+ message : 'Item selected from keyboard 2'
41
+ } ) ;
42
+ }
37
43
}
38
44
39
45
render ( ) {
You can’t perform that action at this time.
0 commit comments