Android Question Msgbox has white text on white background after change of theme colors

Status
Not open for further replies.

jo1234

Active Member
Licensed User
Longtime User
Hi,

I have changed the theme colors as described in https://www.b4x.com/android/forum/threads/theme-colors.87716/#content

The theme colors work for actionbar and most elements.
However, the MsgBoxes have now white text on white background.




How could this be fixed?

This is my manifest (idential to
https://www.b4x.com/android/forum/threads/theme-colors.87716/#content)

B4X:
SetApplicationAttribute(android:theme, "@style/LightTheme")
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-v20, theme.xml,
<resources>
    <style name="LightTheme" parent="@android:style/Theme.Material.Light">
        <item name="android:colorPrimary">@color/actionbar</item>
        <item name="android:colorPrimaryDark">@color/statusbar</item>
        <item name="android:textColorPrimary">@color/textColorPrimary</item>
        <item name="android:navigationBarColor">@color/navigationBar</item>
    </style>
</resources>
)
CreateResource(values-v14, theme.xml,
<resources>
    <style name="LightTheme" parent="@android:style/Theme.Holo.Light">
       <item name="android:actionBarStyle">@style/CustomActionBarStyle</item>
    </style>
   <style name="CustomActionBarStyle" parent="@android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
       <item name="android:background">@color/actionbar</item>
   </style>
</resources>

Thanks a lot,
Johannes
 

Shelby

Well-Known Member
Licensed User
Perhaps you can go to your visual designer, find [click] the box(es) that you have the problem with and change the text color in the properties window under Text Properties/Text Color.
 
Last edited:
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
If light theme then shoud be dark text color and reverse.

So, first of all, change <color name="textColorPrimary">#ffffffff</color> to, for example, <color name="textColorPrimary">#ff000000</color>

Second. I recommend to replace ACToolBarLight to ACToolBarDark (in layout and in code).
 
Upvote 0
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…