Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Android StatusBarColor OverWritten by Qt



  • Hi everybody,
    To set the StatusBarColor I change my style.xml file as it's said in this forum topic:

    http://stackoverflow.com/questions/22192291/how-to-change-the-status-bar-color-in-android

    I add the file
    style.xml with the following code:

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <style name="AppTheme" parent="android:Theme.Material">
            <item name="android:statusBarColor">#FF99CC00</item>
            <item name="android:colorPrimaryDark">#FF99CC00</item>
        </style>    
    </resources>
    

    And in my androidManifest I add:

    android:theme="@style/AppTheme"
    

    So, I expect that in my App, StatusBarColor was #FF99CC00(green), but it's like Qt Overwrittes it.
    I can just see GreenColor during the launching of the application (1 sec or less), then my StatusBarColor gets black.

    Has anyone knows how to solve this?

    Thank you very much.



  • Hi! As an alternative to manually defining the colors for Android via XML, you can have a look at the V-Play Apps SDK. It allows to specify the tint-color for the navigation-bar and status-bar from within QML (see Theme::colors). There are also some good open-source demos to learn about the most important components.

    Best,
    GT


Log in to reply