Android Question Theme Dark

fishwolf

Well-Known Member
Licensed User
Longtime User
i know as custumize the light theme, but not work for dark theme

why?

thanks

B4X:
SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, colors.xml,
<resources>
    <color name="actionbar">#ff039be5</color>
   <color name="statusbar">#ff006db3</color>
   <color name="textColorPrimary">#ffffffff</color>
   <color name="navigationBar">#ff006db3</color>
</resources>
)
CreateResource(values, theme.xml,
<resources>
    <style name="MyAppTheme" parent="Theme.AppCompat.Light">
        <item name="colorPrimary">@color/actionbar</item>
        <item name="colorPrimaryDark">@color/statusbar</item>
        <item name="android:textColorPrimary">@color/textColorPrimary</item>
        <item name="android:navigationBarColor">@color/navigationBar</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="windowActionModeOverlay">true</item>
    </style>
</resources>
)
 

fishwolf

Well-Known Member
Licensed User
Longtime User
are all the color settable into a theme?

for exampe i don't see "colorOnPrimary" and return error if set

B4X:
<item name="colorPrimary">@color/actionbar</item>
        <item name="colorPrimaryDark">@color/statusbar</item>
        <item name="android:textColorPrimary">@color/textColorPrimary</item>
        <item name="android:navigationBarColor">@color/navigationBar</item>
        <item name="windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
        <item name="windowActionModeOverlay">true</item>
 
Last edited:
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
Be aware that change a theme from dark to light may have a impact on the color used on settings make with the designer and / or programmatically. Such asan example the back color change to the character color, text is readable anymore (I think that that was the case when I chanhe colors with the compact menu)
 
Upvote 0
Top