|
@@ -69,8 +69,15 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
|
69
|
69
|
setNavigationStyle(initialScreen);
|
70
|
70
|
}
|
71
|
71
|
|
72
|
|
- private void setupTabs(Bundle style) {
|
|
72
|
+ @Override
|
|
73
|
+ protected void onResume() {
|
|
74
|
+ super.onResume();
|
|
75
|
+ if(mScreenStacks != null) {
|
|
76
|
+ updateStyles();
|
|
77
|
+ }
|
|
78
|
+ }
|
73
|
79
|
|
|
80
|
+ private void setupTabs(Bundle style) {
|
74
|
81
|
mBottomNavigation.setForceTitlesDisplay(style.getBoolean(TAB_STYLE_INACTIVE_TITLES, DEFAULT_TAB_INACTIVE_TITLES));
|
75
|
82
|
mBottomNavigation.setForceTint(true);
|
76
|
83
|
mBottomNavigation.setDefaultBackgroundColor(getColor(style, TAB_STYLE_BAR_BG_COLOR, DEFAULT_TAB_BAR_BG_COLOR));
|
|
@@ -97,7 +104,12 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
|
97
|
104
|
@Override
|
98
|
105
|
public void push(Screen screen) {
|
99
|
106
|
super.push(screen);
|
100
|
|
- mScreenStacks.get(mCurrentStackPosition).push(screen);
|
|
107
|
+ for (ScreenStack stack : mScreenStacks) {
|
|
108
|
+ if (stack.peek().navigatorId.equals(screen.navigatorId)) {
|
|
109
|
+ stack.push(screen);
|
|
110
|
+ }
|
|
111
|
+ }
|
|
112
|
+ updateStyles();
|
101
|
113
|
}
|
102
|
114
|
|
103
|
115
|
@Override
|
|
@@ -106,7 +118,7 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
|
106
|
118
|
for (ScreenStack stack: mScreenStacks) {
|
107
|
119
|
if (stack.peek().navigatorId.equals(navigatorId)) {
|
108
|
120
|
Screen popped = stack.pop();
|
109
|
|
- setNavigationStyle(getCurrentScreen());
|
|
121
|
+ updateStyles();
|
110
|
122
|
return popped;
|
111
|
123
|
}
|
112
|
124
|
}
|
|
@@ -136,8 +148,7 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
|
136
|
148
|
mContentFrame.removeAllViews();
|
137
|
149
|
mContentFrame.addView(mScreenStacks.get(position), new FrameLayout.LayoutParams(MATCH_PARENT, MATCH_PARENT));
|
138
|
150
|
mCurrentStackPosition = position;
|
139
|
|
- mToolbar.setupToolbarButtonsAsync(getCurrentScreen());
|
140
|
|
- setNavigationStyle(getCurrentScreen());
|
|
151
|
+ updateStyles();
|
141
|
152
|
}
|
142
|
153
|
|
143
|
154
|
private static class SetupTabsTask extends AsyncTask<Void, Void, Map<Screen, Drawable>> {
|
|
@@ -163,6 +174,7 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
|
163
|
174
|
@Override
|
164
|
175
|
protected void onPostExecute(Map<Screen, Drawable> icons) {
|
165
|
176
|
mActivity.setTabsWithIcons(mScreens, icons);
|
|
177
|
+ mActivity.updateStyles();
|
166
|
178
|
}
|
167
|
179
|
}
|
168
|
180
|
|