react-native-navigation 7.44.0 → 7.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
package com.reactnativenavigation.viewcontrollers.bottomtabs;
|
|
2
2
|
|
|
3
|
+
import static com.reactnativenavigation.utils.CollectionUtils.forEach;
|
|
4
|
+
import static com.reactnativenavigation.utils.CollectionUtils.map;
|
|
5
|
+
import static com.reactnativenavigation.utils.ObjectUtils.perform;
|
|
6
|
+
|
|
3
7
|
import android.animation.Animator;
|
|
4
8
|
import android.app.Activity;
|
|
5
9
|
import android.content.res.Configuration;
|
|
@@ -9,6 +13,8 @@ import android.view.ViewGroup;
|
|
|
9
13
|
import androidx.annotation.NonNull;
|
|
10
14
|
import androidx.annotation.RestrictTo;
|
|
11
15
|
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
|
16
|
+
import androidx.core.graphics.Insets;
|
|
17
|
+
import androidx.core.view.WindowInsetsCompat;
|
|
12
18
|
|
|
13
19
|
import com.aurelhubert.ahbottomnavigation.AHBottomNavigation;
|
|
14
20
|
import com.aurelhubert.ahbottomnavigation.AHBottomNavigationItem;
|
|
@@ -34,10 +40,6 @@ import java.util.Deque;
|
|
|
34
40
|
import java.util.LinkedList;
|
|
35
41
|
import java.util.List;
|
|
36
42
|
|
|
37
|
-
import static com.reactnativenavigation.utils.CollectionUtils.forEach;
|
|
38
|
-
import static com.reactnativenavigation.utils.CollectionUtils.map;
|
|
39
|
-
import static com.reactnativenavigation.utils.ObjectUtils.perform;
|
|
40
|
-
|
|
41
43
|
public class BottomTabsController extends ParentController<BottomTabsLayout> implements AHBottomNavigation.OnTabSelectedListener, TabSelector {
|
|
42
44
|
|
|
43
45
|
private BottomTabsContainer bottomTabsContainer;
|
|
@@ -84,6 +86,7 @@ public class BottomTabsController extends ParentController<BottomTabsLayout> imp
|
|
|
84
86
|
@Override
|
|
85
87
|
public BottomTabsLayout createView() {
|
|
86
88
|
BottomTabsLayout root = new BottomTabsLayout(getActivity());
|
|
89
|
+
|
|
87
90
|
this.bottomTabsContainer = createBottomTabsContainer();
|
|
88
91
|
this.bottomTabs = bottomTabsContainer.getBottomTabs();
|
|
89
92
|
Options resolveCurrentOptions = resolveCurrentOptions();
|
|
@@ -95,6 +98,7 @@ public class BottomTabsController extends ParentController<BottomTabsLayout> imp
|
|
|
95
98
|
bottomTabs.addItems(createTabs());
|
|
96
99
|
setInitialTab(resolveCurrentOptions);
|
|
97
100
|
tabsAttacher.attach();
|
|
101
|
+
|
|
98
102
|
return root;
|
|
99
103
|
}
|
|
100
104
|
|
|
@@ -299,6 +303,14 @@ public class BottomTabsController extends ParentController<BottomTabsLayout> imp
|
|
|
299
303
|
return presenter.getPopAnimation(appearingOptions, disappearingOptions);
|
|
300
304
|
}
|
|
301
305
|
|
|
306
|
+
@Override
|
|
307
|
+
protected WindowInsetsCompat onApplyWindowInsets(View view, WindowInsetsCompat insets) {
|
|
308
|
+
Insets sysInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
|
309
|
+
view.setPaddingRelative(0, 0, 0, sysInsets.bottom);
|
|
310
|
+
return WindowInsetsCompat.CONSUMED;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
|
|
302
314
|
@RestrictTo(RestrictTo.Scope.TESTS)
|
|
303
315
|
public BottomTabs getBottomTabs() {
|
|
304
316
|
return bottomTabs;
|