ListView + TextInput = troubles with soft keyboard
See original GitHub issueI’am trying to avoid keyboard autohides, when text field is placed at the bottom of the screen, so I need to reduce the main View height to lift up this text field. The events are described below doesn’t work at all, all variants I used don’t show results, is it my mistake or a bug in RN?
import { Dimensions } from 'react-native';
const { Keyboard } = require('react-native');
class Form extends Component {
constructor (props) {
super(props);
this.state = {
visibleHeight: Dimensions.get('window').height
};
}
componentWillMount () {
Keyboard.addListener('keyboardWillShow', this.keyboardWillShow.bind(this));
Keyboard.addListener('keyboardWillHide', this.keyboardWillHide.bind(this));
}
keyboardWillShow (e) {
console.log('keyboardWillShow');
}
keyboardWillHide (e) {
console.log('keyboardWillHide');
}
render(route, navigator) {
return (
<View style={[styles.main_container, {height: this.state.visibleHeight}]}></View>
)
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:15 (4 by maintainers)
Top Results From Across the Web
Issue with EditText in Listview softkeyboard - Stack Overflow
1 Answer 1 ... First write down android:windowSoftInputMode="adjustPan" in Activity in Manifest file to set listview and Edittext and delete ...
Read more >How to open or dismiss the keyboard in Flutter - LogRocket Blog
Using Flutter, learn how to open and close the keyboard on mobile apps, and move across different widgets without dismissing the keyboard.
Read more >Mobile Keyboard - Unity - Manual
In most cases, Unity will handle keyboard input automatically for GUI ... The keyboard will appear automatically when a user taps on editable...
Read more >Toggle State in Listview with Keyboard Input in UI for WinForms ...
Hello, I'm having an issue incorporating a RadToggleSwitchElement into a SimpleListViewVisualItem I'm using in a RadListView. I incorporated it a while...
Read more >ListView - Android Developers
Check whether the called view is a text editor, in which case it would make sense to automatically display a soft input window...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@af7 for me wherever I have text that is obstructed by keyboard, the whole view is scrolled up smoothly. I had to add the following on AndroidManifest, as it would get stuck sometimes after putting the app on background:
android:windowSoftInputMode="adjustPan"
Is there a way to use KeyboardAvoidingView with a ScrollView?