mateusz1913 / react-native-avoid-softinput

Native solution for common React Native problem of focused views being covered by soft input view.
https://mateusz1913.github.io/react-native-avoid-softinput/
MIT License
700 stars 18 forks source link

flickering when using with react navigation bottom bar #181

Closed 25khattab closed 1 year ago

25khattab commented 1 year ago

Environment

Library version: 4.0.1 OS version: pixel 7 android 13

Affected platforms

Current behavior

When moving between the screen a flicker happens and its very visible and annoying and I donot know the reason

only appears when using AvoidSoftInput.setShouldMimicIOSBehavior(true);

https://github.com/mateusz1913/react-native-avoid-softinput/assets/53271078/b27c4bc4-e153-41b2-ade5-85678d79f919

when I use AvoidSoftInput.setShouldMimicIOSBehavior(false);

it doesn't happen but also a flick happens

when opening and closing the keyboard

https://github.com/mateusz1913/react-native-avoid-softinput/assets/53271078/c824ed13-717a-45d9-9904-e9a9ac94bc39

Expected behavior

while AvoidSoftInput.setShouldMimicIOSBehavior(true); it should't do that flicker

Reproduction

https://github.com/25khattab/react-native-template

25khattab commented 1 year ago

@mateusz1913 when you have time please, thank you

mateusz1913 commented 1 year ago

Hey @25khattab, sorry for delay and thanks for proper reproduction repo 🚀

I managed to reproduce it, but I need to dig deeper and will get back to you later today or on weekend

25khattab commented 1 year ago

Thank you @mateusz1913, another thing I noticed The animation doesn't work when mimic ios it just feels laggy Im on pixel 7 running 90 hz. When i ran your app it worked great but it doesn't on mine for some reason I can't figure it out

mateusz1913 commented 1 year ago

Hey @25khattab, it seems that the problem is caused by incorrectly handled safe area. I made a PR in your repo and I'll close this issue as it's not related to the library.

Regarding the animation, if you feel that it doesn't work at all, open new issue and provide a short recording (I assume that reproduction repo will be the same as here), thx!