|
@@ -309,6 +309,7 @@ public class RnnToolBar extends Toolbar {
|
309
|
309
|
private final List<Button> mNewButtons;
|
310
|
310
|
private final WeakReference<RnnToolBar> mToolbarWR;
|
311
|
311
|
@ColorInt private final Integer mTintColor;
|
|
312
|
+ @ColorInt private final Integer mButtonTextColor;
|
312
|
313
|
private final int mIconDimensions;
|
313
|
314
|
|
314
|
315
|
public SetupToolbarButtonsTask(RnnToolBar toolBar, Screen oldScreen, Screen newScreen) {
|
|
@@ -316,6 +317,7 @@ public class RnnToolBar extends Toolbar {
|
316
|
317
|
mOldButtons = oldScreen == null ? null : oldScreen.getButtons();
|
317
|
318
|
mNewButtons = newScreen.getButtons();
|
318
|
319
|
mTintColor = newScreen.navBarButtonColor;
|
|
320
|
+ mButtonTextColor = newScreen.navBarTextColor;
|
319
|
321
|
mIconDimensions = (int) ImageUtils.convertDpToPixel(48, toolBar.getContext());
|
320
|
322
|
}
|
321
|
323
|
|
|
@@ -394,7 +396,7 @@ public class RnnToolBar extends Toolbar {
|
394
|
396
|
}
|
395
|
397
|
|
396
|
398
|
// Tint text buttons
|
397
|
|
- if (textButtons.size() > 0 && mTintColor != null) {
|
|
399
|
+ if (textButtons.size() > 0 && mButtonTextColor != null) {
|
398
|
400
|
final View decorView = ((Activity) context).getWindow().getDecorView();
|
399
|
401
|
decorView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
|
400
|
402
|
@Override
|
|
@@ -408,7 +410,7 @@ public class RnnToolBar extends Toolbar {
|
408
|
410
|
|
409
|
411
|
// Set text color
|
410
|
412
|
for (View button : toolBar.mMenuItems) {
|
411
|
|
- ((TextView) button).setTextColor(mTintColor);
|
|
413
|
+ ((TextView) button).setTextColor(mButtonTextColor);
|
412
|
414
|
}
|
413
|
415
|
|
414
|
416
|
toolBar.mMenuItems.clear();
|