Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android nougat readjusts the view based on keyboard #46

Open
abeikverdi opened this issue Jan 11, 2017 · 10 comments
Open

Android nougat readjusts the view based on keyboard #46

abeikverdi opened this issue Jan 11, 2017 · 10 comments

Comments

@abeikverdi
Copy link

THe library works perfectly find except on Android nougat. On android nugget when the keyboards opened then react native readjusts the view accordingly instead of having the view blocked by the keyboard.
So the library adds an additional keyboard space on top the keyboard as below:

capture

Is there anyway to fix this?

@sibelius
Copy link

use only for ios

@abeikverdi
Copy link
Author

Really? It works on old android versions though!

@kimlet
Copy link

kimlet commented Jan 23, 2017

android does not need this!

  1. set your reactActivity
    android:windowSoftInputMode="adjustResize"

2.set your TextInput view style
position:'absolute' bottom:0

@Andr3wHur5t
Copy link
Owner

Thanks @kimlet for the solution;

Going to add a note to the README so future users don't have to deal with this.

@escalepion
Copy link

hi @kimlet . i was looking for keyboard push the content. but i couldent understand your solition sorry. where will i write your solition ( android:windowSoftInputMode="adjustResize" )... i made my app via crna by the way. thanks.

@wcandillon
Copy link

Thank you for this extremely useful library.
@Andr3wHur5t I changed my code to:

{ Platform.OS === "ios" && <KeyboardSpacer /> }

But how do I know if the android version running needs the keyboardspace or not?

@sibelius
Copy link

we can close this

@wcandillon
Copy link

@sibelius your answer "use only for ios" makes sense but how to detect the running version of android needs to run this as well? 🤔

@sibelius
Copy link

android solves this itself

just use this

android:windowSoftInputMode="adjustResize"

on AndroidManifest

@JeremyBradshaw7
Copy link

AndroidManifest fix works in general for Android, but not when you have a WebView with inputs. Then the KeyboardSpacer can be used, but I'm finding that whereas on some Android models it's necessary to use KeyboardSpacer to avoid the input being hidden behind the keyboard, on others using it can show extra white space above the keyboard. I've not tied down why there's a difference yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants