|
@@ -75,34 +75,6 @@ public class RnnToolBar extends Toolbar {
|
75
|
75
|
mScreens = screens;
|
76
|
76
|
}
|
77
|
77
|
|
78
|
|
- public void setStyle(Screen screen) {
|
79
|
|
- if (screen.toolBarColor != null) {
|
80
|
|
- setBackgroundColor(screen.toolBarColor);
|
81
|
|
- } else {
|
82
|
|
- resetBackground();
|
83
|
|
- }
|
84
|
|
-
|
85
|
|
- if (screen.navBarTextColor != null) {
|
86
|
|
- setTitleTextColor(screen.navBarTextColor);
|
87
|
|
- } else {
|
88
|
|
- resetTitleTextColor();
|
89
|
|
- }
|
90
|
|
-
|
91
|
|
- if (screen.toolBarHidden != null && screen.toolBarHidden) {
|
92
|
|
- hideToolbar();
|
93
|
|
- } else {
|
94
|
|
- showToolbar();
|
95
|
|
- }
|
96
|
|
- }
|
97
|
|
-
|
98
|
|
- private void resetBackground() {
|
99
|
|
- setBackground(mBackground);
|
100
|
|
- }
|
101
|
|
-
|
102
|
|
- private void resetTitleTextColor() {
|
103
|
|
- setTitleTextColor(ContextCompat.getColor(getContext(), android.R.color.primary_text_light));
|
104
|
|
- }
|
105
|
|
-
|
106
|
78
|
public void handleOnCreateOptionsMenuAsync() {
|
107
|
79
|
if (mScreens != null) {
|
108
|
80
|
setupToolbarButtonsAsync(null, mScreens.get(0));
|