Header gets pushed up on Android when keyboard first appears
See original GitHub issueIssue Description
I’m using react-native-keyboard-aware-scroll-view so have to set windowSoftInputMode
to adjustPan
. So I adopted the method of using KeyboardAvoidingView as described in the readme. Here is my code for the screen:
<View style={styles.container}>
<Header
title={selectedConversation.conversation_name}
onGoBack={this.onGoBack}
/>
<GiftedChat
messages={this.getMappedMessages()}
onSend={this.onSend}
user={this.getUser()}
inverted={false}
loadEarlier={!isFetchCompleted(conversationsFetchState)}
isLoadingEarlier={!isFetchCompleted(conversationsFetchState)}
renderLoadEarlier={() => (
<View style={styles.activityIndicatorContainer}>
<ActivityIndicator size="large" color={colors.gray} />
</View>
)}
/>
{Platform.OS === 'android' && (
<KeyboardAvoidingView behavior="padding" />
)}
</View>
However, the header gets pushed up when the keyboard first appears, but as soon as I type it displays normally again.
Here is a screen recording:
How can I fix this?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:13
- Comments:6
Top Results From Across the Web
Why keyboard is pushing up may layout and vanishing my ...
I am making a chat application, but happens what when edit text gets focused mean keyboard comes up it hides my header and...
Read more >How to make your React Native app respond gracefully when ...
The image at the top gets pushed out of the view when using this simple implementation. I'll show you how you can fix...
Read more >KeyboardAvoidingView - React Native
KeyboardAvoidingView. This component will automatically adjust its height, position, or bottom padding based on the keyboard height to ...
Read more >How to push a view up to avoid the keyboard | RNcasts #7
The virtual keyboard obscuring an input is a common issue in mobile apps. In this episode, I show how to solve this issue...
Read more >A Keyboard Avoiding View for React Native in 2021
A Copy-and-Paste Solution that Supports all iOS and Android keyboards!. Tagged with typescript, react, native, hook.
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 FreeTop 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
Top GitHub Comments
For people that are using expo. I fixed it by changing
"softwareKeyboardLayoutMode": "pan"
to"softwareKeyboardLayoutMode": "resize"
in app.jsonHas any one found fix for this