Android Question Activity color at start up

giggetto71

Active Member
Licensed User
Longtime User
Hi,
I am trying to control the android initial activity color.
in the attached project the initial screen gets white if I set the LightTheme in the manifest and it gets black when I set DarkTheme in the manifest.
What I would like is the app to follow the phone mode as many other apps do. basically I would like the initial screen white if the phone is NOT in night mode and I would like it black if the phone is in night mode.
I have tried to customize the manifest like:

B4X:
SetActivityAttribute(Main, android:theme, @style/CustomActTheme)
CreateResource(values, theme.xml,
<resources>
  <style name="CustomActTheme">
  <item name="android:windowBackground">@android:color/transparent</item>
  <item name="android:windowNoTitle">true</item>
  <item name="android:windowFullscreen">false</item>
</style>
</resources>
)


but still I can't get the desired behavior.
thanks for any help.
 

Attachments

  • TestInitialScreen.zip
    9.2 KB · Views: 38
Top