Back button will be dark
This commit is contained in:
parent
5ff9d5bcd8
commit
54c50b1a98
15 changed files with 68 additions and 71 deletions
|
@ -84,14 +84,15 @@ public final class ToolbarContentTintHelper {
|
|||
}
|
||||
}
|
||||
|
||||
public static void colorBackButton(@NonNull Toolbar toolbar, @ColorInt int color) {
|
||||
public static void colorBackButton(@NonNull Toolbar toolbar) {
|
||||
int color = ATHUtil.INSTANCE.resolveColor(toolbar.getContext(), R.attr.colorOnPrimary);
|
||||
final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(color, PorterDuff.Mode.MULTIPLY);
|
||||
for (int i = 0; i < toolbar.getChildCount(); i++) {
|
||||
final View backButton = toolbar.getChildAt(i);
|
||||
if (backButton instanceof ImageView) {
|
||||
((ImageView) backButton).getDrawable().setColorFilter(colorFilter);
|
||||
} else if (backButton instanceof TextView) {
|
||||
// ((TextView) backButton).setTextColor(color);
|
||||
// ((TextView) backButton).setTextColor(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue