Theme Problem when Dark Mode is activated under MIUI 11 / 12

Solution is Found!

Setting false to the <item name="android:forceDarkAllowed">true</item>
in App_Resources/Android/src/main/res/values/styles.xml

Thanks to this link:
https://medium.com/@kivind/nativescript-disabling-dark-mode-382e5dfd11bd

so style.xml should looks like:

    <style name="AppThemeBase" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="toolbarStyle">@style/NativeScriptToolbarStyle</item>
        <item name="android:forceDarkAllowed">false</item>
        <item name="colorPrimary">@color/ns_primary</item>
        <item name="colorPrimaryDark">@color/ns_primaryDark</item>
        <item name="colorAccent">@color/ns_accent</item>
    </style>

Leave a Comment

error code: 521