|
@@ -55,7 +55,6 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
|
55
|
55
|
|
56
|
56
|
private void createBottomTabs() {
|
57
|
57
|
bottomTabs = new BottomTabs(getContext());
|
58
|
|
- setBottomTabsStyle();
|
59
|
58
|
bottomTabs.addTabs(params.tabParams, this);
|
60
|
59
|
}
|
61
|
60
|
|
|
@@ -69,14 +68,6 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
|
69
|
68
|
showStack(screenStacks[0]);
|
70
|
69
|
}
|
71
|
70
|
|
72
|
|
- private void setBottomTabsStyle() {
|
73
|
|
-// bottomTabs.setForceTitlesDisplay(style.getBoolean(TAB_STYLE_INACTIVE_TITLES, DEFAULT_TAB_INACTIVE_TITLES));
|
74
|
|
- bottomTabs.setForceTint(true);
|
75
|
|
-// bottomTabs.setDefaultBackgroundColor(getColor(style, TAB_STYLE_BAR_BG_COLOR, DEFAULT_TAB_BAR_BG_COLOR));
|
76
|
|
-// bottomTabs.setInactiveColor(getColor(style, TAB_STYLE_BUTTON_COLOR, DEFAULT_TAB_BUTTON_COLOR));
|
77
|
|
-// bottomTabs.setAccentColor(getColor(style, TAB_STYLE_SELECTED_COLOR, DEFAULT_TAB_SELECTED_COLOR));
|
78
|
|
- }
|
79
|
|
-
|
80
|
71
|
@Override
|
81
|
72
|
public View asView() {
|
82
|
73
|
return this;
|
|
@@ -150,22 +141,23 @@ public class BottomTabsLayout extends RelativeLayout implements Layout, AHBottom
|
150
|
141
|
public void destroy() {
|
151
|
142
|
for (ScreenStack screenStack : screenStacks) {
|
152
|
143
|
screenStack.destroy();
|
153
|
|
- removeView(screenStack);
|
154
|
144
|
}
|
155
|
|
- screenStacks = null;
|
156
|
145
|
}
|
157
|
146
|
|
158
|
147
|
@Override
|
159
|
|
- public void onTabSelected(int position, boolean wasSelected) {
|
|
148
|
+ public boolean onTabSelected(int position, boolean wasSelected) {
|
160
|
149
|
hideCurrentStack();
|
161
|
150
|
|
162
|
151
|
ScreenStack newStack = screenStacks[position];
|
163
|
152
|
showStack(newStack);
|
164
|
153
|
currentStackIndex = position;
|
|
154
|
+
|
|
155
|
+ return true;
|
165
|
156
|
}
|
166
|
157
|
|
167
|
158
|
private void showStack(ScreenStack newStack) {
|
168
|
159
|
newStack.setVisibility(VISIBLE);
|
|
160
|
+ bottomTabs.setStyleFromScreen(newStack.getCurrentScreenStyleParams());
|
169
|
161
|
}
|
170
|
162
|
|
171
|
163
|
private void hideCurrentStack() {
|