-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
insets.top changed during render on Android with <Statusbar translucent={true} /> #61
Comments
You are making the statusbar translucent in render, so it's going to happen after the component mounts which will then trigger event with new size. It seems expected. You need to set translucent statusbar in your native theme to avoid this. |
What do you mean by native theme? |
1 similar comment
What do you mean by native theme? |
@wong2 @lumberman 'native theme' means setting the values in XML using android theme values (edit: or programattically in java app code, I suppose) see: https://developer.android.com/reference/android/R.attr#windowTranslucentStatus In my case, I specified this behavior in <resources>
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
...
<item name="android:windowTranslucentStatus">true</item> <!-- Added this --> With this style, content extends under the statusbar, and the safe area |
insets.top
will change during render(from 0 to the right value), which makes my element position jumpThe text was updated successfully, but these errors were encountered: