Qt World Summit: Register Today!

Native look is lost in Android 5.1 (using QQuick)

  • I am not sure why, but the same application which is working fine in Android 4.4.2 has lost all the native look in Android 5.1.
    Android 4.4.2 -> Screenshot
    Android 5.1 -> Screenshot

    Modules used in .pro = quick network
    I'm building with Android build SDK = 22

    Any idea what could be the problem?

  • I might be wrong but doesn't 'native look' mean that it either adapts or uses the android look, so this will depend on your android version and since Android 5.x has got another style, your application will have another style too.

  • Yes, probably that's the problem. The styling for Android 5.1 is not developed as yet.
    Is there a way to use the styling of version 4.x.x as a fall back instead?

  • Just in case someone else is struggling with this problem, I found the solution and it is quite simple.
    You just need to indicate the theme to use in your AndroidManifest.xml file explicitly.

    <application ... android:theme="@android:style/Theme.Light"> Or
    <application ... android:theme="@android:style/Theme.Dark">

    This solution will ensure that your application will use the Holo theme (light or dark). Otherwise, it will try to look for the correct theme based on the underlaying Android version, which would be Material theme for version 5 and it is not implemented as yet.

Log in to reply