react-native-navigation 7.25.0-snapshot.550 → 7.25.2
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.
|
@@ -154,17 +154,20 @@ public class ComponentViewController extends ChildController<ComponentLayout> {
|
|
|
154
154
|
@Override
|
|
155
155
|
protected WindowInsetsCompat onApplyWindowInsets(View view, WindowInsetsCompat insets) {
|
|
156
156
|
ViewController<?> viewController = findController(view);
|
|
157
|
-
if (viewController == null || viewController.getView() == null
|
|
157
|
+
if (viewController == null || viewController.getView() == null || ignoreInsets) return insets;
|
|
158
|
+
final Options currentOptions = resolveCurrentOptions(presenter.defaultOptions);
|
|
158
159
|
|
|
159
|
-
final int keyboardBottomInset =
|
|
160
|
-
final Insets systemBarsInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars()
|
|
161
|
-
final int visibleNavBar =
|
|
160
|
+
final int keyboardBottomInset = currentOptions.layout.adjustResize.get(true) ? insets.getInsets(WindowInsetsCompat.Type.ime()).bottom : 0;
|
|
161
|
+
final Insets systemBarsInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars());
|
|
162
|
+
final int visibleNavBar = currentOptions.navigationBar.isVisible.isTrueOrUndefined() ? 1 : 0;
|
|
163
|
+
final int controllerBottomInset = currentOptions.bottomTabsOptions.isHiddenOrDrawBehind() ? 0 : getBottomInset();
|
|
162
164
|
final WindowInsetsCompat finalInsets = new WindowInsetsCompat.Builder().setInsets(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.ime(),
|
|
163
165
|
Insets.of(systemBarsInsets.left,
|
|
164
166
|
0,
|
|
165
167
|
systemBarsInsets.right,
|
|
166
|
-
Math.max(visibleNavBar*systemBarsInsets.bottom,keyboardBottomInset))
|
|
168
|
+
Math.max(0, Math.max(visibleNavBar * systemBarsInsets.bottom, keyboardBottomInset) - controllerBottomInset))
|
|
167
169
|
).build();
|
|
170
|
+
|
|
168
171
|
ViewCompat.onApplyWindowInsets(viewController.getView(), finalInsets);
|
|
169
172
|
return insets;
|
|
170
173
|
}
|