jpudysz / react-native-unistyles

Level up your React Native StyleSheet
https://unistyl.es
MIT License
1.42k stars 40 forks source link

feat: animate bottom insets android #243

Closed jpudysz closed 2 months ago

jpudysz commented 2 months ago

Summary

Fixes #239

With this PR, from Android 11 onwards, rt.insets.bottom will immediately get the correct bottom inset when the keyboard starts to animate (hide). For lower Android versions, this is not possible as such an API does not exist.

It also enables reading the real-time value for the bottom inset with rt.insets.bottom when the app is showing the keyboard. For keyboard hiding animations, rt.insets.bottom will always be set to the app bottom inset (for optimization).

Examples:

1) Keyboard is hidden

2) Keyboard is visible

In the next major version of Unistyles rt.insets.bottom will be update for every pixel.

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-unistyles-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2024 9:00am