[Now Playing] Fixed lyrics and overflow icon color in Color theme
This commit is contained in:
parent
1c94e4d18a
commit
db97705f67
3 changed files with 27 additions and 20 deletions
|
@ -341,7 +341,7 @@ public final class ToolbarContentTintHelper {
|
|||
.setSubtitleTextColor(ATHUtil.INSTANCE.resolveColor(activity, android.R.attr.textColorSecondary));
|
||||
|
||||
//Step 4: Changing the color of the Overflow Menu icon.
|
||||
setOverflowButtonColor(activity, toolbarView, toolbarIconsColor);
|
||||
setOverflowButtonColor(toolbarView, toolbarIconsColor);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -530,6 +530,16 @@ public final class ToolbarContentTintHelper {
|
|||
v.getViewTreeObserver().removeOnGlobalLayoutListener(listener);
|
||||
}
|
||||
|
||||
private static void setOverflowButtonColor(final Toolbar toolbar, final int color) {
|
||||
Drawable drawable = toolbar.getOverflowIcon();
|
||||
if (drawable != null) {
|
||||
// If we don't mutate the drawable, then all drawables with this id will have the ColorFilter
|
||||
drawable.mutate();
|
||||
drawable.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void setOverflowButtonColor(final Activity activity, final Toolbar toolbar,
|
||||
final int toolbarIconsColor) {
|
||||
final ViewGroup decorView = (ViewGroup) activity.getWindow().getDecorView();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue