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

keyboardWillShow does not fire on Android #14275

Closed
brentvatne opened this issue May 31, 2017 · 8 comments
Closed

keyboardWillShow does not fire on Android #14275

brentvatne opened this issue May 31, 2017 · 8 comments
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Resolution: Locked This issue was locked by the bot.

Comments

@brentvatne
Copy link
Collaborator

As per #10613 (comment)

This is easy to verify by searching the repo and verifying that the keyboardWillShow string does not exist in the React Native Android codebase: https://github.com/facebook/react-native/search?utf8=%E2%9C%93&q=keyboardWillShow&type=

@satya164
Copy link
Contributor

AFAIK we meed to listen to root view size changes to detect when keyboard is shown/hidden. So I am not sure if willX events can even be implemented.

@ptomasroos
Copy link
Contributor

I can only add to whats @satya164 saying. As with my knowledge in this as well there is no way to actually discover when a soft keyboard will happen. May I ask in what use-case this would be needed? I know people are using will* to make transitions "faster" on IOS.

@brentvatne
Copy link
Collaborator Author

@ptomasroos - I think it's less about making them "faster" and instead making them more responsive, so it can animate while the keyboard is opening rather than waiting until it has opened. I don't have a personal use case but just copied this over from #10613.

If anyone reads this and knows if it's possible to hook into a notification for the soft keyboard beginning to open on Android, let us know here!

@janicduplessis
Copy link
Contributor

Yea keyboard handling is really bad on Android, there is no event triggered so the way used to detect when it opens is to use a layout listener on the window and check if the height changed. Doing this means there is only one event triggered, the only thing we could do is trigger both keyboardWillShow and keyboardDidShow at the same time so the behavior is closer to iOS but that may not be really useful...

@brentvatne
Copy link
Collaborator Author

It sounds like the best thing to do is clearly document this limitation then. Any takers?

@brentvatne brentvatne added Documentation Good first issue Interested in collaborating? Take a stab at fixing one of these issues. labels Jun 6, 2017
@TinoADev
Copy link
Contributor

TinoADev commented Jun 6, 2017

Just opened a PR for this. Its my very first so if I did anything wrong please let me know.

@reznord
Copy link

reznord commented Jun 13, 2017

If this is still open, I'd like to work on this.

facebook-github-bot pushed a commit that referenced this issue Jun 19, 2017
Summary:
Clarified documentation for keyboardWillShow on Android as seen in issue #14275

Clarifies documentation of keyboardWillShow

None as it is just a comment that changed.
Closes #14350

Differential Revision: D5275173

Pulled By: shergin

fbshipit-source-id: d4fb08de71e6be40bb363dfc82d38b191570c476
@evanjmg
Copy link

evanjmg commented Dec 1, 2017

I've added 'adjustNothing' to AndroidManifest with the latest react native - 0.51.0-rc.2- this does not work -

@facebook facebook locked as resolved and limited conversation to collaborators Jul 13, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good first issue Interested in collaborating? Take a stab at fixing one of these issues. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

8 participants