Android Question [solved] Starting app with dark mode

angel_

Well-Known Member
Licensed User
Longtime User
When I start the app the white screen appears while loading the views, how can I remove this effect or directly start the app with the dark mode?, is possible?

B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)

SetApplicationAttribute(android:theme, "@style/MyAppTheme")

CreateResource(values, MyAppTheme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.DayNight.NoActionBar">
    </style>
</resources>
)
 

Attachments

  • TestDark.zip
    11.5 KB · Views: 231

angel_

Well-Known Member
Licensed User
Longtime User
I tried that but it appears like a flash, it is very very short but it is uncomfortable
 
Upvote 0

angel_

Well-Known Member
Licensed User
Longtime User
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…