|
@@ -9,6 +9,7 @@ import android.widget.FrameLayout;
|
9
|
9
|
|
10
|
10
|
import com.aurelhubert.ahbottomnavigation.AHBottomNavigation;
|
11
|
11
|
import com.aurelhubert.ahbottomnavigation.AHBottomNavigationItem;
|
|
12
|
+import com.facebook.react.bridge.ReadableMap;
|
12
|
13
|
import com.reactnativenavigation.R;
|
13
|
14
|
import com.reactnativenavigation.core.RctManager;
|
14
|
15
|
import com.reactnativenavigation.core.objects.Screen;
|
|
@@ -189,6 +190,23 @@ public class BottomTabActivity extends BaseReactActivity implements AHBottomNavi
|
189
|
190
|
}
|
190
|
191
|
}
|
191
|
192
|
|
|
193
|
+ @Override
|
|
194
|
+ public void switchToTab(ReadableMap params) {
|
|
195
|
+ int tabIndex = params.getInt(KEY_TAB_INDEX);
|
|
196
|
+ mBottomNavigation.setCurrentItem(tabIndex);
|
|
197
|
+ }
|
|
198
|
+
|
|
199
|
+ @Override
|
|
200
|
+ public void toggleTabs(ReadableMap params) {
|
|
201
|
+ boolean hide = params.getBoolean(KEY_HIDDEN);
|
|
202
|
+ boolean animated = params.getBoolean(KEY_ANIMATED);
|
|
203
|
+ if (hide) {
|
|
204
|
+ mBottomNavigation.hideBottomNavigation(animated);
|
|
205
|
+ } else {
|
|
206
|
+ mBottomNavigation.restoreBottomNavigation(animated);
|
|
207
|
+ }
|
|
208
|
+ }
|
|
209
|
+
|
192
|
210
|
private static class SetupTabsTask extends AsyncTask<Void, Void, Map<Screen, Drawable>> {
|
193
|
211
|
private BottomTabActivity mActivity;
|
194
|
212
|
private RnnToolBar mToolBar;
|