-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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 not triggered in Android #3468
Comments
I can confirm this. |
Yes, we have the same problem. |
so it is not supported in Android? |
Keyboard events are unimplemented on Android. |
@yychun1217 |
@satya164 Both componentDidMount() {
DeviceEventEmitter.addListener('KeyboardDidShow', e => {
// Nope
});
DeviceEventEmitter.addListener('keyboardWillShow', e => {
// Nope
});
} |
@matth3wga0 I'm using |
@satya164 I'm using v0.14.2 and running on Android 5.1, what's yours? |
@matth3wga0 Was using 0.12 previously, now using 0.15-rc, on Android 5.1. |
@satya164 Thanks, I'll have a try with 0.15-rc. |
keyboardWillShow and keyboardDidHide are not in RN 0.18-rc |
+1 for interest |
+1 Does anyone have a workaround for this? |
+1 RN: 18.1, Android: 5.0.2, Device: LG G2 |
I use
|
+1 this still doesn't work in android |
ok, i somehow missed this, so... thanks @skv-headless |
@zoharlevin Holy crap it works! Thanks! |
it works, thanks man On Wed, Feb 24, 2016 at 9:03 AM, motiazu notifications@github.com wrote:
|
@christopherdro NOTE I don't think |
@GantMan Feel free to submit a PR adding this functionality and link it back to this thread. |
According to this issue: facebook#3468 , only `keyboardDidShow`and `keyboardDidHide` events are available on android. I think this information should be displayed in the documentation since default `android:windowSoftInputMode` is `adjustResize`.
According to this issue: facebook#3468 , only `keyboardDidShow`and `keyboardDidHide` events are available on android. I think this information should be displayed in the documentation since default `android:windowSoftInputMode` is `adjustResize`.
Summary: What existing problem does the pull request solve? According to this issue: #3468 , only `keyboardDidShow`and `keyboardDidHide` events are available on android at this moment. I think this information should be displayed in the documentation since default `android:windowSoftInputMode` is `adjustResize`. Closes #13155 Differential Revision: D4795828 Pulled By: hramos fbshipit-source-id: 2c114f3040808a5cc3cdeb29b2067877df353620
@christopherdro why was this closed? In the docs it says that all event should fire for both iOS and Android: https://facebook.github.io/react-native/docs/keyboard.html If some events have not been implemented yet, then the docs should be updated to reflect that some events are iOS only. |
@otoinsa you can try using |
Summary: What existing problem does the pull request solve? According to this issue: facebook#3468 , only `keyboardDidShow`and `keyboardDidHide` events are available on android at this moment. I think this information should be displayed in the documentation since default `android:windowSoftInputMode` is `adjustResize`. Closes facebook#13155 Differential Revision: D4795828 Pulled By: hramos fbshipit-source-id: 2c114f3040808a5cc3cdeb29b2067877df353620
keyboardWillShow/keyboardWillHide still not working on Android? |
same issue , react native version is 0.44.0 |
This is working on 0.46 |
@carlos-peru where is this documented? thanks |
|
The documentation says:
Does that mean adjustPan works for example? That first sentence seems to imply keyboardWillShow and keyboardWillHide is available on other input modes. |
I can confirm that if you set android:windowSoftInputMode to adjustNothing none of events are available for Android. |
I also need the event when android:windowSoftInputMode is adjustNothing 😢 |
I can't get windowSoftInput mode to work reliably, and KeyboardAvoidingView is hard to debug so I was hoping to get at this feature more directly in Android. But it's not working. RN 49. |
As keyboardWillShow and KeyboardWillHide are not fired on Android. facebook/react-native#3468 https://facebook.github.io/react-native/docs/keyboard.html
* [iOS] Move message content up when keyboard pops up. * [Android] Update offset onLayout. Manually determine new offset at the time of keyboard dismiss. * Removed log statements. * Removed unused variables. * Fix: flow errors. * Fix: listComponent and _scrollOffset undefined error. * Adjust scroll position just before keyboard toggle. Listen to keyboardWillShow & keyboardWillHide instead of keyboardDidShow && keyboardDidHide. * Fix: sometimes list is scrolled randomly when keyboard toggles. * Scroll to end when ~50% to ~99% screen is occupied. * Fix: list is scrolled to end when list is at top and keyboard pops. * Listen to KeyboardDidShow and KeyboardDidHide for Android. As keyboardWillShow and KeyboardWillHide are not fired on Android. facebook/react-native#3468 https://facebook.github.io/react-native/docs/keyboard.html
+1 confirmed no event when android:windowSoftInputMode is adjustNothing |
I'm running into the same problem in that the However, when the On iOS I've been working around this problem by adding a spacer View with a height of the keyboard at the end of my view when the keyboard opens, but since the event doesn't fire, this work around doesn't work for Android. So, at the moment, on Android you can either have keyboard events (with It's a bit of a pickle... |
It's works both iOS and Android.
|
@kkotkkio I don't think that works the way we want it to. You're still doing |
I know I'm beating the dead horse here but the issue opened in Oct 2015 and it's still not working in 2018 at RN 55.4 |
I'm facing same issue when |
@christopherdro @shergin Can someone explain why this was closed please? |
I am registering for
keyboardWillShow
like this:This works fine in iOS, but in Android it does not trigger the event as expected.
keyboardDidShow
does work in Android.The text was updated successfully, but these errors were encountered: