diff options
Diffstat (limited to 'src/main/java/de/pixart/messenger/utils/ThemeHelper.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/utils/ThemeHelper.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/utils/ThemeHelper.java b/src/main/java/de/pixart/messenger/utils/ThemeHelper.java index 27a48f069..d12a5c1d3 100644 --- a/src/main/java/de/pixart/messenger/utils/ThemeHelper.java +++ b/src/main/java/de/pixart/messenger/utils/ThemeHelper.java @@ -36,6 +36,7 @@ import android.content.res.TypedArray; import android.preference.PreferenceManager; import android.support.annotation.StyleRes; import android.support.design.widget.Snackbar; +import android.support.v4.content.ContextCompat; import android.util.TypedValue; import android.widget.TextView; @@ -85,8 +86,9 @@ public class ThemeHelper { } } - public static void fixTextSize(Snackbar snackbar) { - TypedArray typedArray = snackbar.getContext().obtainStyledAttributes(new int[]{R.attr.TextSizeBody1}); + public static void fix(Snackbar snackbar) { + final Context context = snackbar.getContext(); + TypedArray typedArray = context.obtainStyledAttributes(new int[]{R.attr.TextSizeBody1}); final float size = typedArray.getDimension(0, 0f); typedArray.recycle(); if (size != 0f) { @@ -95,6 +97,7 @@ public class ThemeHelper { if (text != null && action != null) { text.setTextSize(TypedValue.COMPLEX_UNIT_PX, size); action.setTextSize(TypedValue.COMPLEX_UNIT_PX, size); + action.setTextColor(ContextCompat.getColor(context, R.color.deep_purple_a100)); } } } |