Giter VIP home page Giter VIP logo

Comments (4)

satya164 avatar satya164 commented on June 24, 2024

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.

from react-native-safe-area-context.

wong2 avatar wong2 commented on June 24, 2024

What do you mean by native theme?

from react-native-safe-area-context.

lumberman avatar lumberman commented on June 24, 2024

What do you mean by native theme?

from react-native-safe-area-context.

davidgovea avatar davidgovea commented on June 24, 2024

@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 android/app/src/main/res/values/styles.xml:

<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 properly include the status bar.

from react-native-safe-area-context.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.