react-native-navigation 7.24.3 → 7.25.1
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.
- package/lib/android/app/build.gradle +12 -9
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/Options.java +2 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/layout/LayoutInsets.kt +44 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/layout/LayoutOptions.kt +71 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/utils/PrimitiveExt.kt +9 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewController.java +4 -3
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/navigator/Navigator.java +5 -0
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/Presenter.java +23 -7
- package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewController.java +12 -3
- package/lib/dist/src/interfaces/Options.d.ts +10 -0
- package/lib/ios/RNNBasePresenter.m +17 -0
- package/lib/ios/RNNBottomTabsController.m +1 -0
- package/lib/ios/RNNBridgeManager.mm +5 -3
- package/lib/ios/RNNComponentViewController.m +5 -0
- package/lib/ios/RNNLayoutOptions.h +2 -1
- package/lib/ios/RNNLayoutOptions.m +4 -0
- package/lib/ios/RNNModalHostViewManagerHandler.h +11 -0
- package/lib/ios/RNNModalHostViewManagerHandler.m +40 -0
- package/lib/ios/RNNModalManager.h +2 -2
- package/lib/ios/RNNModalManager.m +0 -26
- package/lib/ios/RNNStackPresenter.m +1 -0
- package/lib/ios/ReactNativeNavigation.xcodeproj/project.pbxproj +8 -0
- package/lib/src/interfaces/Options.ts +12 -0
- package/package.json +3 -1
- package/.buildkite/pipeline.yml +0 -59
- package/lib/android/app/src/main/java/com/reactnativenavigation/options/LayoutOptions.java +0 -48
- package/lib/android/app/src/test/java/com/reactnativenavigation/BaseTest.java +0 -178
- package/lib/android/app/src/test/java/com/reactnativenavigation/EnvironmentTest.java +0 -43
- package/lib/android/app/src/test/java/com/reactnativenavigation/TestActivity.java +0 -23
- package/lib/android/app/src/test/java/com/reactnativenavigation/TestApplication.java +0 -35
- package/lib/android/app/src/test/java/com/reactnativenavigation/TestUtils.java +0 -62
- package/lib/android/app/src/test/java/com/reactnativenavigation/fakes/IconResolverFake.kt +0 -8
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/BackDrawable.java +0 -30
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/ImageLoaderMock.kt +0 -49
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/Mocks.kt +0 -18
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/SimpleComponentViewController.java +0 -15
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/SimpleOverlay.java +0 -54
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/SimpleViewController.java +0 -113
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestComponentLayout.java +0 -79
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestComponentViewCreator.java +0 -18
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TestReactView.java +0 -71
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TitleBarButtonCreatorMock.java +0 -34
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TitleBarReactViewCreatorMock.java +0 -20
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TopBarBackgroundViewCreatorMock.java +0 -20
- package/lib/android/app/src/test/java/com/reactnativenavigation/mocks/TypefaceLoaderMock.kt +0 -21
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/LayoutNodeParserTest.java +0 -51
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/OptionsTest.java +0 -315
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/OrientationOptionsTest.java +0 -81
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/TopBarButtonsTest.kt +0 -95
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/TransitionAnimationOptionsTest.kt +0 -122
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/BoolParserTest.java +0 -28
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/ColorParseTest.java +0 -50
- package/lib/android/app/src/test/java/com/reactnativenavigation/options/parsers/JSONParserTest.java +0 -64
- package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/PresenterTest.java +0 -56
- package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/RenderCheckerTest.java +0 -59
- package/lib/android/app/src/test/java/com/reactnativenavigation/presentation/SideMenuPresenterTest.java +0 -35
- package/lib/android/app/src/test/java/com/reactnativenavigation/react/NavigationModuleTest.java +0 -102
- package/lib/android/app/src/test/java/com/reactnativenavigation/react/ReloadListenerTest.java +0 -24
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/AnimationHelper.kt +0 -33
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ButtonPresenterTest.java +0 -241
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ButtonSpanTest.java +0 -57
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/CompatUtilsTest.java +0 -17
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/LayoutFactoryTest.java +0 -78
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/MotionEventTest.kt +0 -47
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/NativeCommandListenerTest.java +0 -60
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/OptionHelper.java +0 -16
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ReflectionUtilsTest.java +0 -26
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/StringUtilsTest.java +0 -19
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/SystemUiUtilsTest.kt +0 -27
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/TitleAndButtonsMeasurerTest.kt +0 -357
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/TitleBarHelper.java +0 -54
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/UiThreadTest.java +0 -29
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/UiUtilsTest.java +0 -22
- package/lib/android/app/src/test/java/com/reactnativenavigation/utils/ViewHelper.java +0 -9
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/OptionsApplyingTest.java +0 -149
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabPresenterTest.java +0 -206
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsAttacherTest.java +0 -62
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsControllerTest.kt +0 -589
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsPresenterTest.kt +0 -173
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AfterInitialTabTest.java +0 -38
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/AttachModeTest.java +0 -86
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/OnSwitchToTabTest.java +0 -31
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/bottomtabs/attacher/modes/TogetherTest.java +0 -20
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/button/NavigationIconResolverTest.java +0 -78
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllerTest.java +0 -80
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/child/ChildControllersRegistryTest.java +0 -56
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/component/ComponentViewControllerTest.java +0 -216
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/externalcomponent/ExternalComponentViewControllerTest.java +0 -97
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/externalcomponent/FragmentCreatorMock.java +0 -34
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/externalcomponent/SomeFragment.java +0 -8
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/fakes/FakeParentController.kt +0 -33
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalAnimatorMock.java +0 -40
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalAnimatorTest.kt +0 -213
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalPresenterTest.java +0 -319
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/modal/ModalStackTest.java +0 -367
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/NavigatorTest.java +0 -898
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/RootPresenterTest.kt +0 -254
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/overlay/OverlayManagerTest.java +0 -108
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/parent/ParentControllerTest.java +0 -299
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/sidemenu/SideMenuControllerTest.java +0 -446
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/BackButtonHelperTest.java +0 -77
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/FloatingActionButtonTest.java +0 -154
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/IdStackTest.java +0 -114
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackAnimatorTest.kt +0 -241
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerTest.kt +0 -1165
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackPresenterTest.kt +0 -1081
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TitleBarButtonControllerTest.java +0 -61
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TitleBarReactViewControllerTest.java +0 -43
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TopBarButtonControllerTest.java +0 -120
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/TopBarControllerTest.kt +0 -432
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/toptabs/TopTabsViewControllerTest.java +0 -249
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/viewcontroller/ViewControllerTest.java +0 -337
- package/lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/viewcontroller/YellowBoxDelegateTest.java +0 -68
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/OverlayTouchDelegateTest.java +0 -60
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/TitleAndButtonsContainerTest.kt +0 -477
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/TopBarTest.java +0 -82
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/animations/BaseViewAnimatorTest.kt +0 -109
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/animations/DefaultViewAnimatorCreatorFake.kt +0 -36
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/bottomtabs/BottomTabsContainerTest.kt +0 -101
- package/lib/android/app/src/test/java/com/reactnativenavigation/views/bottomtabs/BottomTabsTest.kt +0 -40
- package/lib/android/app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker +0 -1
|
@@ -172,6 +172,7 @@ allprojects { p ->
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
dependencies {
|
|
175
|
+
|
|
175
176
|
implementation "androidx.core:core-ktx:1.6.0"
|
|
176
177
|
implementation "org.jetbrains.kotlin:$kotlinStdlib:$kotlinVersion"
|
|
177
178
|
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinCoroutinesCore"
|
|
@@ -189,13 +190,15 @@ dependencies {
|
|
|
189
190
|
//noinspection GradleDynamicVersion
|
|
190
191
|
implementation 'com.facebook.react:react-native:+'
|
|
191
192
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
193
|
+
if("Playground".toLowerCase() == rootProject.name.toLowerCase()){
|
|
194
|
+
// tests only for our playground
|
|
195
|
+
testImplementation 'junit:junit:4.13.2'
|
|
196
|
+
testImplementation "org.robolectric:robolectric:4.7.2"
|
|
197
|
+
testImplementation 'org.assertj:assertj-core:3.11.1'
|
|
198
|
+
testImplementation 'org.mockito:mockito-core:4.0.0'
|
|
199
|
+
testImplementation 'com.squareup.assertj:assertj-android:1.2.0'
|
|
200
|
+
testImplementation 'org.mockito:mockito-inline:3.4.0'
|
|
201
|
+
testImplementation "org.mockito.kotlin:mockito-kotlin:4.0.0"
|
|
202
|
+
testImplementation "org.jetbrains.kotlin:kotlin-test:$kotlinVersion"
|
|
203
|
+
}
|
|
201
204
|
}
|
|
@@ -2,6 +2,8 @@ package com.reactnativenavigation.options;
|
|
|
2
2
|
|
|
3
3
|
import android.content.Context;
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
import com.reactnativenavigation.options.layout.LayoutOptions;
|
|
5
7
|
import com.reactnativenavigation.options.params.NullNumber;
|
|
6
8
|
import com.reactnativenavigation.options.params.NullText;
|
|
7
9
|
import com.reactnativenavigation.options.parsers.TypefaceLoader;
|
package/lib/android/app/src/main/java/com/reactnativenavigation/options/layout/LayoutInsets.kt
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
package com.reactnativenavigation.options.layout
|
|
2
|
+
|
|
3
|
+
import com.reactnativenavigation.utils.dp
|
|
4
|
+
import org.json.JSONObject
|
|
5
|
+
|
|
6
|
+
class LayoutInsets(
|
|
7
|
+
var top: Int?=null,
|
|
8
|
+
var left: Int?=null,
|
|
9
|
+
var bottom: Int?=null,
|
|
10
|
+
var right: Int?=null
|
|
11
|
+
) {
|
|
12
|
+
fun merge(toMerge: LayoutInsets?, defaults: LayoutInsets?) {
|
|
13
|
+
toMerge?.let { options->
|
|
14
|
+
options.top?.let { this.top = it }
|
|
15
|
+
options.bottom?.let { this.bottom = it }
|
|
16
|
+
options.left?.let { this.left = it }
|
|
17
|
+
options.right?.let { this.right = it }
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
defaults?.let {
|
|
21
|
+
options->
|
|
22
|
+
top = top?:options.top
|
|
23
|
+
left = left?:options.left
|
|
24
|
+
right = right?:options.right
|
|
25
|
+
bottom = bottom?:options.bottom
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
companion object{
|
|
30
|
+
fun parse(jsonObject: JSONObject?): LayoutInsets {
|
|
31
|
+
return LayoutInsets(
|
|
32
|
+
jsonObject?.optInt("top")?.dp,
|
|
33
|
+
jsonObject?.optInt("left")?.dp,
|
|
34
|
+
jsonObject?.optInt("bottom")?.dp,
|
|
35
|
+
jsonObject?.optInt("right")?.dp
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
fun hasValue(): Boolean {
|
|
41
|
+
return top!=null || bottom!=null || left!=null || right!=null
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
}
|
package/lib/android/app/src/main/java/com/reactnativenavigation/options/layout/LayoutOptions.kt
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
package com.reactnativenavigation.options.layout
|
|
2
|
+
|
|
3
|
+
import android.content.Context
|
|
4
|
+
import com.reactnativenavigation.options.LayoutDirection
|
|
5
|
+
import com.reactnativenavigation.options.OrientationOptions
|
|
6
|
+
import com.reactnativenavigation.options.params.*
|
|
7
|
+
import com.reactnativenavigation.options.params.Number
|
|
8
|
+
import com.reactnativenavigation.options.parsers.BoolParser
|
|
9
|
+
import com.reactnativenavigation.options.parsers.NumberParser
|
|
10
|
+
import org.json.JSONObject
|
|
11
|
+
|
|
12
|
+
class LayoutOptions {
|
|
13
|
+
@JvmField
|
|
14
|
+
var backgroundColor: ThemeColour = NullThemeColour()
|
|
15
|
+
|
|
16
|
+
@JvmField
|
|
17
|
+
var componentBackgroundColor: ThemeColour = NullThemeColour()
|
|
18
|
+
|
|
19
|
+
@JvmField
|
|
20
|
+
var topMargin: Number = NullNumber()
|
|
21
|
+
|
|
22
|
+
@JvmField
|
|
23
|
+
var adjustResize: Bool = NullBool()
|
|
24
|
+
|
|
25
|
+
@JvmField
|
|
26
|
+
var orientation = OrientationOptions()
|
|
27
|
+
|
|
28
|
+
@JvmField
|
|
29
|
+
var direction = LayoutDirection.DEFAULT
|
|
30
|
+
|
|
31
|
+
var insets: LayoutInsets = LayoutInsets()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
fun mergeWith(other: LayoutOptions) {
|
|
35
|
+
if (other.backgroundColor.hasValue()) backgroundColor = other.backgroundColor
|
|
36
|
+
if (other.componentBackgroundColor.hasValue()) componentBackgroundColor = other.componentBackgroundColor
|
|
37
|
+
if (other.topMargin.hasValue()) topMargin = other.topMargin
|
|
38
|
+
if (other.orientation.hasValue()) orientation = other.orientation
|
|
39
|
+
if (other.direction.hasValue()) direction = other.direction
|
|
40
|
+
if (other.adjustResize.hasValue()) adjustResize = other.adjustResize
|
|
41
|
+
insets.merge(other.insets, null)
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
fun mergeWithDefault(defaultOptions: LayoutOptions) {
|
|
45
|
+
if (!backgroundColor.hasValue()) backgroundColor = defaultOptions.backgroundColor
|
|
46
|
+
if (!componentBackgroundColor.hasValue()) componentBackgroundColor = defaultOptions.componentBackgroundColor
|
|
47
|
+
if (!topMargin.hasValue()) topMargin = defaultOptions.topMargin
|
|
48
|
+
if (!orientation.hasValue()) orientation = defaultOptions.orientation
|
|
49
|
+
if (!direction.hasValue()) direction = defaultOptions.direction
|
|
50
|
+
if (!adjustResize.hasValue()) adjustResize = defaultOptions.adjustResize
|
|
51
|
+
insets.merge(null, defaultOptions.insets)
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
companion object {
|
|
56
|
+
@JvmStatic
|
|
57
|
+
fun parse(context: Context?, json: JSONObject?): LayoutOptions {
|
|
58
|
+
val result = LayoutOptions()
|
|
59
|
+
if (json == null) return result
|
|
60
|
+
result.backgroundColor = ThemeColour.parse(context!!, json.optJSONObject("backgroundColor"))
|
|
61
|
+
result.componentBackgroundColor = ThemeColour.parse(context, json.optJSONObject("componentBackgroundColor"))
|
|
62
|
+
result.topMargin = NumberParser.parse(json, "topMargin")
|
|
63
|
+
result.insets = LayoutInsets.parse(json.optJSONObject("insets"))
|
|
64
|
+
result.orientation = OrientationOptions.parse(json)
|
|
65
|
+
result.direction = LayoutDirection.fromString(json.optString("direction", ""))
|
|
66
|
+
result.adjustResize = BoolParser.parse(json, "adjustResize")
|
|
67
|
+
return result
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
package com.reactnativenavigation.utils
|
|
2
|
+
|
|
3
|
+
import android.content.res.Resources
|
|
4
|
+
|
|
5
|
+
val Int.dp: Int
|
|
6
|
+
get() = (this * Resources.getSystem().displayMetrics.density).toInt()
|
|
7
|
+
|
|
8
|
+
val Float.dp: Int
|
|
9
|
+
get() = (this * Resources.getSystem().displayMetrics.density).toInt()
|
|
@@ -144,16 +144,17 @@ public class ComponentViewController extends ChildController<ComponentLayout> {
|
|
|
144
144
|
protected WindowInsetsCompat onApplyWindowInsets(View view, WindowInsetsCompat insets) {
|
|
145
145
|
ViewController<?> viewController = findController(view);
|
|
146
146
|
if (viewController == null || viewController.getView() == null) return insets;
|
|
147
|
-
final
|
|
147
|
+
final int keyboardBottomInset = options.layout.adjustResize.get(true) ? insets.getInsets( WindowInsetsCompat.Type.ime()).bottom : 0;
|
|
148
148
|
final Insets systemBarsInsets = insets.getInsets(WindowInsetsCompat.Type.systemBars() );
|
|
149
149
|
final int visibleNavBar = resolveCurrentOptions(presenter.defaultOptions).navigationBar.isVisible.isTrueOrUndefined()?1:0;
|
|
150
150
|
final WindowInsetsCompat finalInsets = new WindowInsetsCompat.Builder().setInsets(WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.ime(),
|
|
151
151
|
Insets.of(systemBarsInsets.left,
|
|
152
152
|
0,
|
|
153
153
|
systemBarsInsets.right,
|
|
154
|
-
Math.max(visibleNavBar*systemBarsInsets.bottom,
|
|
154
|
+
Math.max(visibleNavBar*systemBarsInsets.bottom,keyboardBottomInset))
|
|
155
155
|
).build();
|
|
156
|
-
|
|
156
|
+
ViewCompat.onApplyWindowInsets(viewController.getView(), finalInsets);
|
|
157
|
+
return insets;
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
@Override
|
|
@@ -4,11 +4,13 @@ import android.app.Activity;
|
|
|
4
4
|
import android.content.res.Configuration;
|
|
5
5
|
import android.view.View;
|
|
6
6
|
import android.view.ViewGroup;
|
|
7
|
+
import android.view.WindowInsets;
|
|
7
8
|
|
|
8
9
|
import androidx.annotation.NonNull;
|
|
9
10
|
import androidx.annotation.Nullable;
|
|
10
11
|
import androidx.annotation.RestrictTo;
|
|
11
12
|
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
|
13
|
+
import androidx.core.view.WindowInsetsCompat;
|
|
12
14
|
|
|
13
15
|
import com.facebook.react.ReactInstanceManager;
|
|
14
16
|
import com.reactnativenavigation.options.Options;
|
|
@@ -82,6 +84,8 @@ public class Navigator extends ParentController<ViewGroup> {
|
|
|
82
84
|
overlaysLayout = new CoordinatorLayout(getActivity());
|
|
83
85
|
}
|
|
84
86
|
|
|
87
|
+
|
|
88
|
+
|
|
85
89
|
public void bindViews() {
|
|
86
90
|
modalStack.setModalsLayout(modalsLayout);
|
|
87
91
|
modalStack.setRootLayout(rootLayout);
|
|
@@ -147,6 +151,7 @@ public class Navigator extends ParentController<ViewGroup> {
|
|
|
147
151
|
final ViewController<?> disappearing = previousRoot;
|
|
148
152
|
root = appearing;
|
|
149
153
|
root.setOverlay(new RootOverlay(getActivity(), contentLayout));
|
|
154
|
+
root.setParentController(this);
|
|
150
155
|
rootPresenter.setRoot(appearing, disappearing, defaultOptions, new CommandListenerAdapter(commandListener) {
|
|
151
156
|
@Override
|
|
152
157
|
public void onSuccess(String childId) {
|
|
@@ -5,18 +5,17 @@ import android.graphics.Color;
|
|
|
5
5
|
import android.graphics.drawable.ColorDrawable;
|
|
6
6
|
import android.graphics.drawable.Drawable;
|
|
7
7
|
import android.graphics.drawable.LayerDrawable;
|
|
8
|
-
import android.os.Build;
|
|
9
8
|
import android.view.View;
|
|
9
|
+
import android.view.ViewGroup;
|
|
10
10
|
import android.view.ViewGroup.MarginLayoutParams;
|
|
11
11
|
import android.view.Window;
|
|
12
12
|
|
|
13
|
-
import androidx.core.content.ContextCompat;
|
|
14
|
-
|
|
15
13
|
import com.reactnativenavigation.options.NavigationBarOptions;
|
|
16
14
|
import com.reactnativenavigation.options.Options;
|
|
17
15
|
import com.reactnativenavigation.options.OrientationOptions;
|
|
18
16
|
import com.reactnativenavigation.options.StatusBarOptions;
|
|
19
17
|
import com.reactnativenavigation.options.StatusBarOptions.TextColorScheme;
|
|
18
|
+
import com.reactnativenavigation.options.layout.LayoutInsets;
|
|
20
19
|
import com.reactnativenavigation.options.params.Bool;
|
|
21
20
|
import com.reactnativenavigation.utils.SystemUiUtils;
|
|
22
21
|
import com.reactnativenavigation.viewcontrollers.parent.ParentController;
|
|
@@ -25,6 +24,7 @@ import com.reactnativenavigation.viewcontrollers.navigator.Navigator;
|
|
|
25
24
|
public class Presenter {
|
|
26
25
|
private final Activity activity;
|
|
27
26
|
private Options defaultOptions;
|
|
27
|
+
|
|
28
28
|
public Presenter(Activity activity, Options defaultOptions) {
|
|
29
29
|
this.activity = activity;
|
|
30
30
|
this.defaultOptions = defaultOptions;
|
|
@@ -40,9 +40,15 @@ public class Presenter {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
public void mergeOptions(ViewController<?> viewController, Options options) {
|
|
43
|
-
final Options withDefaults =
|
|
43
|
+
final Options withDefaults = viewController.resolveCurrentOptions().copy().mergeWith(options).withDefaultOptions(defaultOptions);
|
|
44
44
|
mergeStatusBarOptions(viewController.getView(), withDefaults.statusBar);
|
|
45
45
|
mergeNavigationBarOptions(withDefaults.navigationBar);
|
|
46
|
+
applyLayoutInsetsOnMostTopParent(viewController,withDefaults.layout.getInsets());
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
private void applyLayoutInsetsOnMostTopParent(ViewController<?> viewController, LayoutInsets layoutInsets) {
|
|
50
|
+
final ViewController<?> topMostParent = viewController.getTopMostParent();
|
|
51
|
+
applyLayoutInsets(topMostParent.getView(), layoutInsets);
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
public void applyOptions(ViewController view, Options options) {
|
|
@@ -65,6 +71,16 @@ public class Presenter {
|
|
|
65
71
|
private void applyViewOptions(ViewController view, Options options) {
|
|
66
72
|
applyBackgroundColor(view, options);
|
|
67
73
|
applyTopMargin(view.getView(), options);
|
|
74
|
+
applyLayoutInsetsOnMostTopParent(view, options.layout.getInsets());
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private void applyLayoutInsets(ViewGroup view, LayoutInsets layoutInsets) {
|
|
78
|
+
if ( view!=null && layoutInsets.hasValue()) {
|
|
79
|
+
view.setPadding(layoutInsets.getLeft() == null ? view.getPaddingLeft() : layoutInsets.getLeft(),
|
|
80
|
+
layoutInsets.getTop() == null ? view.getPaddingTop() : layoutInsets.getTop(),
|
|
81
|
+
layoutInsets.getRight() == null ?view.getPaddingRight() : layoutInsets.getRight(),
|
|
82
|
+
layoutInsets.getBottom() == null ? view.getPaddingBottom() : layoutInsets.getBottom());
|
|
83
|
+
}
|
|
68
84
|
}
|
|
69
85
|
|
|
70
86
|
private void applyTopMargin(View view, Options options) {
|
|
@@ -209,12 +225,12 @@ public class Presenter {
|
|
|
209
225
|
}
|
|
210
226
|
|
|
211
227
|
private void setNavigationBarBackgroundColor(NavigationBarOptions navigationBar) {
|
|
212
|
-
|
|
213
|
-
|
|
228
|
+
int navigationBarDefaultColor = SystemUiUtils.INSTANCE.getNavigationBarDefaultColor();
|
|
229
|
+
navigationBarDefaultColor = navigationBarDefaultColor == -1 ? Color.BLACK : navigationBarDefaultColor;
|
|
214
230
|
if (navigationBar.backgroundColor.canApplyValue()) {
|
|
215
231
|
int color = navigationBar.backgroundColor.get(navigationBarDefaultColor);
|
|
216
232
|
SystemUiUtils.setNavigationBarBackgroundColor(activity.getWindow(), color, isColorLight(color));
|
|
217
|
-
}else{
|
|
233
|
+
} else {
|
|
218
234
|
SystemUiUtils.setNavigationBarBackgroundColor(activity.getWindow(), navigationBarDefaultColor, isColorLight(navigationBarDefaultColor));
|
|
219
235
|
|
|
220
236
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
package com.reactnativenavigation.viewcontrollers.viewcontroller;
|
|
2
2
|
|
|
3
|
+
import static com.reactnativenavigation.utils.CollectionUtils.forEach;
|
|
4
|
+
import static com.reactnativenavigation.utils.ObjectUtils.perform;
|
|
5
|
+
|
|
3
6
|
import android.app.Activity;
|
|
4
7
|
import android.content.res.Configuration;
|
|
5
8
|
import android.view.View;
|
|
@@ -31,9 +34,6 @@ import com.reactnativenavigation.views.component.Renderable;
|
|
|
31
34
|
import java.util.ArrayList;
|
|
32
35
|
import java.util.List;
|
|
33
36
|
|
|
34
|
-
import static com.reactnativenavigation.utils.CollectionUtils.forEach;
|
|
35
|
-
import static com.reactnativenavigation.utils.ObjectUtils.perform;
|
|
36
|
-
|
|
37
37
|
public abstract class ViewController<T extends ViewGroup> implements ViewTreeObserver.OnGlobalLayoutListener,
|
|
38
38
|
ViewGroup.OnHierarchyChangeListener,
|
|
39
39
|
BehaviourAdapter {
|
|
@@ -157,6 +157,14 @@ public abstract class ViewController<T extends ViewGroup> implements ViewTreeObs
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
+
public ViewController<?> getTopMostParent(){
|
|
161
|
+
if(parentController!=null){
|
|
162
|
+
return parentController.getTopMostParent();
|
|
163
|
+
}else{
|
|
164
|
+
return this;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
160
168
|
@CallSuper
|
|
161
169
|
public void applyOptions(Options options) {
|
|
162
170
|
|
|
@@ -289,6 +297,7 @@ public abstract class ViewController<T extends ViewGroup> implements ViewTreeObs
|
|
|
289
297
|
if (view.getParent() instanceof ViewGroup) {
|
|
290
298
|
((ViewManager) view.getParent()).removeView(view);
|
|
291
299
|
}
|
|
300
|
+
setParentController(null);
|
|
292
301
|
view = null;
|
|
293
302
|
isDestroyed = true;
|
|
294
303
|
}
|
|
@@ -133,6 +133,16 @@ export interface OptionsLayout {
|
|
|
133
133
|
* #### (iOS specific)
|
|
134
134
|
*/
|
|
135
135
|
autoHideHomeIndicator?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Add insets to the top layout
|
|
138
|
+
*/
|
|
139
|
+
insets?: Insets;
|
|
140
|
+
/**
|
|
141
|
+
* Resizes the layout when keyboard is visible
|
|
142
|
+
* @default true
|
|
143
|
+
* #### (Android specific)
|
|
144
|
+
*/
|
|
145
|
+
adjustResize?: boolean;
|
|
136
146
|
}
|
|
137
147
|
export declare enum OptionsModalPresentationStyle {
|
|
138
148
|
formSheet = "formSheet",
|
|
@@ -58,6 +58,15 @@
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
- (void)applyOptions:(RNNNavigationOptions *)options {
|
|
61
|
+
UIViewController *viewController = self.boundViewController;
|
|
62
|
+
RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
|
|
63
|
+
if (withDefault.layout.insets.hasValue) {
|
|
64
|
+
viewController.topMostViewController.additionalSafeAreaInsets =
|
|
65
|
+
UIEdgeInsetsMake([withDefault.layout.insets.top withDefault:0],
|
|
66
|
+
[withDefault.layout.insets.left withDefault:0],
|
|
67
|
+
[withDefault.layout.insets.bottom withDefault:0],
|
|
68
|
+
[withDefault.layout.insets.right withDefault:0]);
|
|
69
|
+
}
|
|
61
70
|
}
|
|
62
71
|
|
|
63
72
|
- (void)mergeOptions:(RNNNavigationOptions *)mergeOptions
|
|
@@ -83,6 +92,14 @@
|
|
|
83
92
|
_prefersHomeIndicatorAutoHidden = mergeOptions.layout.autoHideHomeIndicator.get;
|
|
84
93
|
[self.boundViewController setNeedsUpdateOfHomeIndicatorAutoHidden];
|
|
85
94
|
}
|
|
95
|
+
|
|
96
|
+
if (mergeOptions.layout.insets.hasValue) {
|
|
97
|
+
self.boundViewController.topMostViewController.additionalSafeAreaInsets =
|
|
98
|
+
UIEdgeInsetsMake([withDefault.layout.insets.top withDefault:0],
|
|
99
|
+
[withDefault.layout.insets.left withDefault:0],
|
|
100
|
+
[withDefault.layout.insets.bottom withDefault:0],
|
|
101
|
+
[withDefault.layout.insets.right withDefault:0]);
|
|
102
|
+
}
|
|
86
103
|
}
|
|
87
104
|
|
|
88
105
|
- (void)renderComponents:(RNNNavigationOptions *)options
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
#import "RNNComponentViewCreator.h"
|
|
5
5
|
#import "RNNEventEmitter.h"
|
|
6
6
|
#import "RNNLayoutManager.h"
|
|
7
|
+
#import "RNNModalHostViewManagerHandler.h"
|
|
7
8
|
#import "RNNReactComponentRegistry.h"
|
|
8
9
|
#import "RNNReactRootViewCreator.h"
|
|
9
10
|
#import "RNNSplashScreen.h"
|
|
10
11
|
#import <React/RCTBridge.h>
|
|
11
|
-
#import <React/RCTModalHostViewManager.h>
|
|
12
12
|
#import <React/RCTUIManager.h>
|
|
13
13
|
|
|
14
14
|
@interface RNNBridgeManager ()
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
@property(nonatomic, strong, readonly) RNNLayoutManager *layoutManager;
|
|
20
20
|
@property(nonatomic, strong, readonly) RNNOverlayManager *overlayManager;
|
|
21
21
|
@property(nonatomic, strong, readonly) RNNModalManager *modalManager;
|
|
22
|
+
@property(nonatomic, strong, readonly) RNNModalHostViewManagerHandler *modalHostViewHandler;
|
|
22
23
|
|
|
23
24
|
@end
|
|
24
25
|
|
|
@@ -66,7 +67,8 @@
|
|
|
66
67
|
[[RNNModalManagerEventHandler alloc] initWithEventEmitter:eventEmitter];
|
|
67
68
|
_modalManager = [[RNNModalManager alloc] initWithBridge:bridge
|
|
68
69
|
eventHandler:modalManagerEventHandler];
|
|
69
|
-
|
|
70
|
+
_modalHostViewHandler =
|
|
71
|
+
[[RNNModalHostViewManagerHandler alloc] initWithModalManager:_modalManager];
|
|
70
72
|
_layoutManager = [[RNNLayoutManager alloc] init];
|
|
71
73
|
|
|
72
74
|
id<RNNComponentViewCreator> rootViewCreator =
|
|
@@ -105,7 +107,7 @@
|
|
|
105
107
|
|
|
106
108
|
- (void)onJavaScriptLoaded {
|
|
107
109
|
[_commandsHandler setReadyToReceiveCommands:true];
|
|
108
|
-
[
|
|
110
|
+
[_modalHostViewHandler
|
|
109
111
|
connectModalHostViewManager:[self.bridge moduleForClass:RCTModalHostViewManager.class]];
|
|
110
112
|
[[_bridge moduleForClass:[RNNEventEmitter class]] sendOnAppLaunched];
|
|
111
113
|
}
|
|
@@ -111,6 +111,11 @@
|
|
|
111
111
|
[self updateReactViewConstraints];
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
- (void)viewDidLayoutSubviews {
|
|
115
|
+
[super viewDidLayoutSubviews];
|
|
116
|
+
[self.presenter applyOptionsOnViewDidLayoutSubviews:self.resolveOptions];
|
|
117
|
+
}
|
|
118
|
+
|
|
114
119
|
- (void)updateReactViewConstraints {
|
|
115
120
|
if (self.isViewLoaded && self.reactView) {
|
|
116
121
|
[NSLayoutConstraint deactivateConstraints:_reactViewConstraints];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
#import "RNNInsetsOptions.h"
|
|
1
2
|
#import "RNNOptions.h"
|
|
2
|
-
|
|
3
3
|
@interface RNNLayoutOptions : RNNOptions
|
|
4
4
|
|
|
5
5
|
@property(nonatomic, strong) Color *backgroundColor;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
@property(nonatomic, strong) Text *direction;
|
|
8
8
|
@property(nonatomic, strong) id orientation;
|
|
9
9
|
@property(nonatomic, strong) Bool *autoHideHomeIndicator;
|
|
10
|
+
@property(nonatomic, strong) RNNInsetsOptions *insets;
|
|
10
11
|
|
|
11
12
|
- (UIInterfaceOrientationMask)supportedOrientations;
|
|
12
13
|
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
self.direction = [TextParser parse:dict key:@"direction"];
|
|
12
12
|
self.orientation = dict[@"orientation"];
|
|
13
13
|
self.autoHideHomeIndicator = [BoolParser parse:dict key:@"autoHideHomeIndicator"];
|
|
14
|
+
self.insets = [[RNNInsetsOptions alloc] initWithDict:dict[@"insets"]];
|
|
14
15
|
return self;
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -25,6 +26,9 @@
|
|
|
25
26
|
self.orientation = options.orientation;
|
|
26
27
|
if (options.autoHideHomeIndicator)
|
|
27
28
|
self.autoHideHomeIndicator = options.autoHideHomeIndicator;
|
|
29
|
+
if (options.insets.hasValue) {
|
|
30
|
+
self.insets = options.insets;
|
|
31
|
+
}
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
- (UIInterfaceOrientationMask)supportedOrientations {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#import "RNNModalManager.h"
|
|
2
|
+
#import <Foundation/Foundation.h>
|
|
3
|
+
#import <React/RCTModalHostViewManager.h>
|
|
4
|
+
|
|
5
|
+
@interface RNNModalHostViewManagerHandler : NSObject
|
|
6
|
+
|
|
7
|
+
- (instancetype)initWithModalManager:(RNNModalManager *)modalManager;
|
|
8
|
+
|
|
9
|
+
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager;
|
|
10
|
+
|
|
11
|
+
@end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#import "RNNModalHostViewManagerHandler.h"
|
|
2
|
+
|
|
3
|
+
@implementation RNNModalHostViewManagerHandler {
|
|
4
|
+
RNNModalManager *_modalManager;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
- (instancetype)initWithModalManager:(RNNModalManager *)modalManager {
|
|
8
|
+
self = [super init];
|
|
9
|
+
_modalManager = modalManager;
|
|
10
|
+
return self;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager {
|
|
14
|
+
modalHostViewManager.presentationBlock =
|
|
15
|
+
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
|
|
16
|
+
dispatch_block_t completionBlock) {
|
|
17
|
+
if (reactViewController.presentedViewController != viewController &&
|
|
18
|
+
[self->_modalManager topPresentedVC] != viewController) {
|
|
19
|
+
[self->_modalManager showModal:viewController
|
|
20
|
+
animated:animated
|
|
21
|
+
completion:^(NSString *_Nonnull componentId) {
|
|
22
|
+
if (completionBlock)
|
|
23
|
+
completionBlock();
|
|
24
|
+
}];
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
modalHostViewManager.dismissalBlock =
|
|
29
|
+
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
|
|
30
|
+
dispatch_block_t completionBlock) {
|
|
31
|
+
[self->_modalManager dismissModal:viewController
|
|
32
|
+
animated:animated
|
|
33
|
+
completion:^{
|
|
34
|
+
if (completionBlock)
|
|
35
|
+
completionBlock();
|
|
36
|
+
}];
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@end
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
#import "RNNModalManagerEventHandler.h"
|
|
2
2
|
#import <Foundation/Foundation.h>
|
|
3
3
|
#import <React/RCTBridge.h>
|
|
4
|
-
#import <React/RCTModalHostViewManager.h>
|
|
5
4
|
#import <UIKit/UIKit.h>
|
|
6
5
|
|
|
7
6
|
typedef void (^RNNTransitionCompletionBlock)(void);
|
|
@@ -13,7 +12,6 @@ typedef void (^RNNTransitionRejectionBlock)(NSString *_Nonnull code, NSString *_
|
|
|
13
12
|
|
|
14
13
|
- (instancetype _Nonnull)initWithBridge:(RCTBridge *_Nonnull)bridge
|
|
15
14
|
eventHandler:(RNNModalManagerEventHandler *_Nonnull)eventHandler;
|
|
16
|
-
- (void)connectModalHostViewManager:(RCTModalHostViewManager *_Nonnull)modalHostViewManager;
|
|
17
15
|
|
|
18
16
|
- (void)showModal:(UIViewController *_Nonnull)viewController
|
|
19
17
|
animated:(BOOL)animated
|
|
@@ -25,4 +23,6 @@ typedef void (^RNNTransitionRejectionBlock)(NSString *_Nonnull code, NSString *_
|
|
|
25
23
|
|
|
26
24
|
- (void)reset;
|
|
27
25
|
|
|
26
|
+
- (UIViewController *)topPresentedVC;
|
|
27
|
+
|
|
28
28
|
@end
|
|
@@ -32,32 +32,6 @@
|
|
|
32
32
|
return self;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
- (void)connectModalHostViewManager:(RCTModalHostViewManager *)modalHostViewManager {
|
|
36
|
-
modalHostViewManager.presentationBlock =
|
|
37
|
-
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
|
|
38
|
-
dispatch_block_t completionBlock) {
|
|
39
|
-
if (reactViewController.presentedViewController != viewController) {
|
|
40
|
-
[self showModal:viewController
|
|
41
|
-
animated:animated
|
|
42
|
-
completion:^(NSString *_Nonnull componentId) {
|
|
43
|
-
if (completionBlock)
|
|
44
|
-
completionBlock();
|
|
45
|
-
}];
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
modalHostViewManager.dismissalBlock =
|
|
50
|
-
^(UIViewController *reactViewController, UIViewController *viewController, BOOL animated,
|
|
51
|
-
dispatch_block_t completionBlock) {
|
|
52
|
-
[self dismissModal:viewController
|
|
53
|
-
animated:animated
|
|
54
|
-
completion:^{
|
|
55
|
-
if (completionBlock)
|
|
56
|
-
completionBlock();
|
|
57
|
-
}];
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
35
|
- (void)showModal:(UIViewController<RNNLayoutProtocol> *)viewController
|
|
62
36
|
animated:(BOOL)animated
|
|
63
37
|
completion:(RNNTransitionWithComponentIdCompletionBlock)completion {
|
|
@@ -88,6 +88,7 @@
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
- (void)applyOptionsOnViewDidLayoutSubviews:(RNNNavigationOptions *)options {
|
|
91
|
+
[super applyOptionsOnViewDidLayoutSubviews:options];
|
|
91
92
|
RNNNavigationOptions *withDefault = [options withDefault:[self defaultOptions]];
|
|
92
93
|
if (withDefault.topBar.background.component.name.hasValue) {
|
|
93
94
|
[self presentBackgroundComponent];
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
4534E72620CB6724009F8185 /* RNNLargeTitleOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */; };
|
|
52
52
|
500623A525B7003A0086AB39 /* RNNShadowOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 500623A325B7003A0086AB39 /* RNNShadowOptions.h */; };
|
|
53
53
|
500623A625B7003A0086AB39 /* RNNShadowOptions.m in Sources */ = {isa = PBXBuildFile; fileRef = 500623A425B7003A0086AB39 /* RNNShadowOptions.m */; };
|
|
54
|
+
5006E12C27974B8900D106A6 /* RNNModalHostViewManagerHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 5006E12A27974B8900D106A6 /* RNNModalHostViewManagerHandler.h */; };
|
|
55
|
+
5006E12D27974B8900D106A6 /* RNNModalHostViewManagerHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 5006E12B27974B8900D106A6 /* RNNModalHostViewManagerHandler.m */; };
|
|
54
56
|
5008641223856A2D00A55BE9 /* UITabBar+utils.m in Sources */ = {isa = PBXBuildFile; fileRef = 5008641023856A2C00A55BE9 /* UITabBar+utils.m */; };
|
|
55
57
|
501214C9217741A000435148 /* libOCMock.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 501214C8217741A000435148 /* libOCMock.a */; };
|
|
56
58
|
501223D72173590F000F5F98 /* RNNStackPresenter.h in Headers */ = {isa = PBXBuildFile; fileRef = 501223D52173590F000F5F98 /* RNNStackPresenter.h */; };
|
|
@@ -580,6 +582,8 @@
|
|
|
580
582
|
4534E72420CB6724009F8185 /* RNNLargeTitleOptions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RNNLargeTitleOptions.m; sourceTree = "<group>"; };
|
|
581
583
|
500623A325B7003A0086AB39 /* RNNShadowOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNShadowOptions.h; sourceTree = "<group>"; };
|
|
582
584
|
500623A425B7003A0086AB39 /* RNNShadowOptions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNShadowOptions.m; sourceTree = "<group>"; };
|
|
585
|
+
5006E12A27974B8900D106A6 /* RNNModalHostViewManagerHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RNNModalHostViewManagerHandler.h; sourceTree = "<group>"; };
|
|
586
|
+
5006E12B27974B8900D106A6 /* RNNModalHostViewManagerHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RNNModalHostViewManagerHandler.m; sourceTree = "<group>"; };
|
|
583
587
|
5008641023856A2C00A55BE9 /* UITabBar+utils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UITabBar+utils.m"; sourceTree = "<group>"; };
|
|
584
588
|
5008641123856A2D00A55BE9 /* UITabBar+utils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UITabBar+utils.h"; sourceTree = "<group>"; };
|
|
585
589
|
501214C8217741A000435148 /* libOCMock.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libOCMock.a; sourceTree = "<group>"; };
|
|
@@ -1092,6 +1096,8 @@
|
|
|
1092
1096
|
390AD476200F499D00A8250D /* RNNSwizzles.m */,
|
|
1093
1097
|
506A2B1220973DFD00F43A95 /* RNNErrorHandler.h */,
|
|
1094
1098
|
506A2B1320973DFD00F43A95 /* RNNErrorHandler.m */,
|
|
1099
|
+
5006E12A27974B8900D106A6 /* RNNModalHostViewManagerHandler.h */,
|
|
1100
|
+
5006E12B27974B8900D106A6 /* RNNModalHostViewManagerHandler.m */,
|
|
1095
1101
|
50644A1E20E11A720026709C /* Constants.h */,
|
|
1096
1102
|
50644A1F20E11A720026709C /* Constants.m */,
|
|
1097
1103
|
50706E6B20CE7CA5003345C3 /* UIImage+utils.h */,
|
|
@@ -1818,6 +1824,7 @@
|
|
|
1818
1824
|
files = (
|
|
1819
1825
|
506BF6622600AE7600A22755 /* BoundsTransition.h in Headers */,
|
|
1820
1826
|
91CB34C9250ED50C000C132B /* RNNSearchBarOptions.h in Headers */,
|
|
1827
|
+
5006E12C27974B8900D106A6 /* RNNModalHostViewManagerHandler.h in Headers */,
|
|
1821
1828
|
5060DE73219DAD7E00D0C052 /* ReactNativeNavigation.h in Headers */,
|
|
1822
1829
|
506BF7CE26067B0500A22755 /* AnimatedUIImageView.h in Headers */,
|
|
1823
1830
|
5022EDBD2405237100852BA6 /* BottomTabPresenterCreator.h in Headers */,
|
|
@@ -2337,6 +2344,7 @@
|
|
|
2337
2344
|
5017D9EF239D2FAF00B74047 /* BottomTabsAfterInitialTabAttacher.m in Sources */,
|
|
2338
2345
|
5008641223856A2D00A55BE9 /* UITabBar+utils.m in Sources */,
|
|
2339
2346
|
9FDA2ABE24F2A42C005678CC /* RCTConvert+UIFontWeight.m in Sources */,
|
|
2347
|
+
5006E12D27974B8900D106A6 /* RNNModalHostViewManagerHandler.m in Sources */,
|
|
2340
2348
|
9FDA2AC024F2A43B005678CC /* RCTConvert+SideMenuOpenGestureMode.m in Sources */,
|
|
2341
2349
|
50BCB27223F1650800D6C8E5 /* SharedElementTransition.m in Sources */,
|
|
2342
2350
|
E5F6C3A822DB4D0F0093C2CE /* UIView+Utils.m in Sources */,
|