I have react-native 0.37.0 and react-native-keyboard-aware-scroll-view 0.2.6, basic scrolling functionality works for me, but neither extraScrollHeight nor extraHeight works for me.
Work on iOS version, though.
I'm using it because I have buttons below input and I want to make them visible when the keyboard is present. I set extraScrollHeight to the buttons' height and it works for me on iOS but not on Android.
I have the same issue. +1 The text input lands just above the keyboard like without this module.
react-native: 0.39.0
react-native-keyboard-aware-scroll-view: 0.2.6
I think that's not the same issue, @devbriguy. Have you tried to set up android:windowSoftInputMode="adjustResize" in your manifest?
Yes. I see then it's adjusting automatically? I do however need this in another part of the app. Is it possible to toggle or override it?
+1
@devbriguy use this lib https://github.com/jr-k/react-native-android-keyboard-adjust
@lesniakania I'm super busy ATM, will try to work on this asap.
@lesniakania if you feel you can investigate and send a PR, that would be awesome too :)
I removed android:windowSoftInputMode="adjustResize" and same result as before. I have both props in-use.
@alvaromb I already checked the Keyboard code in RN, sadly it only emits keyboardDidShow and keyboardDidHide events. So our code never be called when the Keyboard shows and hides. Is there any particular reason that you choose keyboardWillShow and keyboardWillHide event?
@Swordsman-Inaction IIRC those events were the only ones available when I developed the component. Do you wanna change them and check if that solves this issue?
@alvaromb
First, we can use keyboardDidShow and keyboardDidHide events on iOS, but the animation is much slower than before since it takes more than 500ms to emit those events after the Will* events are emitted. Even I decreased the _KAM_KEYBOARD_OPENING_TIME from 250ms to 0ms, it's still slow to show the Keyboard. So the solution here is still use Will* events on iOS and use Did* events on Android.
Second, you wrote the UIManager.viewIsDescendantOf thing for iOS, right? But Android doesn't have this, so it doesn't work on Android which causes the error. I will try to implement this method on Android first, then get back to this issue.
Hi @Swordsman-Inaction!
So the solution here is still use Will* events on iOS and use Did* events on Android.
OK.
Second, you wrote the UIManager.viewIsDescendantOf thing for iOS, right? But Android doesn't have this, so it doesn't work on Android which causes the error
Yes, I wrote that function on the react-native repo: https://github.com/facebook/react-native/pull/7876. It's only available on iOS (sorry, I was an iOS developer before, I don't have Android experience). The solution would be to send a PR to the react-native repo to add that function into the Android code, which I believe it should be easy to do because the layout methods I based on should be in Android too.
Ping me if you need further help.
Many thanks for your work!
Should work with the latest release https://github.com/APSL/react-native-keyboard-aware-scroll-view/releases/tag/v0.3.0
I'm encountering the same issue using the 0.3.0
Do you still see the problem too @lesniakania or others ?
Edit : After playing a bit with it, I managed to _kind of_ achieve what I wanted by setting windowSoftInputMode to adjustResize and by commenting the code modifying the paddingBottom of the newContentContainerStyle in KeyboardAwareScrollView.js on Android. Anyway the feature is still buggy on 0.3.0.
Edit 2 : After playing more, using the same code as iOS in the updateKeyboardSpace function in KeyboardAwareMixin.js seems to make it work (=> https://github.com/truckfly/react-native-keyboard-aware-scroll-view/)
I'm getting this on 0.4.1 on RN 0.49. extraScrollHeight has no effects on Android.
I have android:windowSoftInputMode="adjustResize" set on AndroidManifest.
Ping @Swordsman-Inaction
@luco
Could you please provide more detail?
Did you set enableOnAndroid to true?
@luco android:windowSoftInputMode needs to be adjustPan
I'm running into what @luco is as well and I have enabledOnAndroid set to true and android:windowSoftInputMode is set to adjustPan in my AndroidManifest.xml
"react-native": "0.49.3",
"react-native-keyboard-aware-scroll-view": "^0.4.1",
I really fail to understand the logic of even having that enabledOnAndroid prop, and worse, it is false by default.
Most helpful comment
I'm getting this on
0.4.1on RN0.49.extraScrollHeighthas no effects on Android.I have
android:windowSoftInputMode="adjustResize"set on AndroidManifest.