How I fixed wrong colors in my QML app on Android

I removed android:theme from AndroidManifest.xml:

<activity android:name="net.geographx.MainActivity"
    android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
    android:label="@string/app_name"
    android:theme="@style/AppTheme"
    android:launchMode="singleTask"
    android:screenOrientation="portrait"
    android:exported="true">
    <!-- Splash screen -->
    <meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/splash"/>
    <!-- Splash screen -->

and removed apptheme.xml from platform\android\res\values directory:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="AppTheme" parent="@android:style/Theme.DeviceDefault.NoActionBar">
        <item name="android:windowBackground">@drawable/splash</item>
    </style>
</resources>

2 Responses to How I fixed wrong colors in my QML app on Android

  1. dmitriano says:

    https://forum.qt.io/topic/99541/how-to-have-a-splash-screen-in-android-application-built-with-qml/3
    <meta-data android:name="android.app.splash_screen_drawable" android:resource="@drawable/launch_logo"/>

Leave a Reply

Your email address will not be published. Required fields are marked *