Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Android StatusBarColor OverWritten by Qt
Qt 6.11 is out! See what's new in the release blog

Android StatusBarColor OverWritten by Qt

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • carles.sole.grauC Offline
    carles.sole.grauC Offline
    carles.sole.grau
    wrote on last edited by carles.sole.grau
    #1

    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.

    1 Reply Last reply
    0
    • GTDevG Offline
      GTDevG Offline
      GTDev
      wrote on last edited by GTDev
      #2

      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

      Senior Developer at Felgo - https://felgo.com/qt

      Develop mobile Apps for iOS & Android with Qt
      Felgo is an official Qt Technology Partner

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved