Android Question Set dialog text colori by manifest

mike1967

Active Member
Licensed User
Longtime User
Hello,in my app i set light theme and set textPrimaryColor to #FFFFFFFF but when dialog appears the text Is White on White.How to avoid this in manifest without change primary color? Thanks in advances
 

mike1967

Active Member
Licensed User
Longtime User
You can explicitly set the text color using CSBuilder.
I use csbuilder and b4xPages.SetTitle(me,cs) With color White After setting textPrimaryColor=#FF000000 (black) in the manifest but how avoid for the a lapse time that the text in title appears black then White? Thanks in advances
 
Upvote 0

mike1967

Active Member
Licensed User
Longtime User
Can you create a small project that reproduces it? Have you tested it in release mode? I expect it to be fast.
SOLVED i hope with this:
code:
CreateResource(values, colors.xml,
<resources>
 <color name="actionbar">#FFFF0000</color>
   <color name="statusbar">#FFFF0000</color>
   <color name="textColorPrimary">#FFFFFFFF</color>
   <color name="navigationBar">#FFFF0000</color>
</resources>
)
CreateResource(values, 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>
        <item name="android:colorAccent">@color/navigationBar</item>
        <item name="android:alertDialogTheme">@style/AlertDialogCustom</item>
    </style>

    <style name="AlertDialogCustom" parent="@android:style/Theme.Material.Light.Dialog.Alert">
      <item name="android:colorPrimary">@color/actionbar</item>
      <item name="android:colorAccent">@color/navigationBar</item>
    </style>
</resources>
 
Upvote 0
Top