Override textColorPrimary and not textColor as it conflicts with support libraries (e.g. snackbar text).

Further, use textColorPrimary in the graphs instead of textColor.
master
Daniele Gobbetti 2017-03-11 16:48:55 +01:00
parent 68608f8582
commit 2c152e8447
2 changed files with 3 additions and 3 deletions

View File

@ -433,7 +433,7 @@ public class GBApplication extends Application {
public static int getTextColor(Context context) {
TypedValue typedValue = new TypedValue();
Resources.Theme theme = context.getTheme();
theme.resolveAttribute(android.R.attr.textColor, typedValue, true);
theme.resolveAttribute(android.R.attr.textColorPrimary, typedValue, true);
return typedValue.data;
}

View File

@ -1,7 +1,7 @@
<resources>
<style name="GadgetbridgeTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:textColor">@color/primarytext_light</item>
<item name="android:textColorPrimary">@color/primarytext_light</item>
<item name="android:textColorSecondary">@color/secondarytext</item>
<item name="colorPrimary">@color/primary_light</item>
<item name="colorPrimaryDark">@color/primarydark_light</item>
@ -21,7 +21,7 @@
<!-- dark theme -->
<style name="GadgetbridgeThemeDark" parent="Theme.AppCompat">
<item name="android:textColor">@color/primarytext_dark</item>
<item name="android:textColorPrimary">@color/primarytext_dark</item>
<item name="android:textColorSecondary">@color/secondarytext</item>
<item name="colorPrimary">@color/primary_dark</item>
<item name="colorPrimaryDark">@color/primarydark_dark</item>