react-native-navigation 8.7.4 → 8.7.5-snapshot.2299
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/android/ARCHITECTURE.md +458 -0
- package/android/src/main/java/com/reactnativenavigation/views/stack/topbar/titlebar/IconBackgroundDrawable.kt +20 -17
- package/ios/ARCHITECTURE.md +416 -0
- package/ios/BottomTabsAfterInitialTabAttacher.mm +31 -0
- package/ios/RNNNavigationOptions.h +1 -0
- package/ios/RNNNavigationOptions.mm +4 -0
- package/ios/RNNOverlayManager.mm +4 -0
- package/ios/RNNScrollEdgeAppearanceOptions.h +2 -0
- package/ios/RNNScrollEdgeAppearanceOptions.mm +2 -0
- package/ios/ScreenAnimationController.mm +29 -24
- package/ios/StackControllerDelegate.mm +21 -3
- package/ios/TopBarAppearancePresenter.mm +35 -0
- package/lib/module/ARCHITECTURE.md +301 -0
- package/lib/module/Mock/Application.js +33 -0
- package/lib/module/Mock/Application.js.map +1 -0
- package/lib/module/Mock/ComponentProps.js +4 -0
- package/lib/module/Mock/ComponentProps.js.map +1 -0
- package/lib/module/Mock/Components/BottomTabs.js +16 -0
- package/lib/module/Mock/Components/BottomTabs.js.map +1 -0
- package/lib/module/Mock/Components/ComponentScreen.js +101 -0
- package/lib/module/Mock/Components/ComponentScreen.js.map +1 -0
- package/lib/module/Mock/Components/LayoutComponent.js +50 -0
- package/lib/module/Mock/Components/LayoutComponent.js.map +1 -0
- package/lib/module/Mock/Components/Modals.js +22 -0
- package/lib/module/Mock/Components/Modals.js.map +1 -0
- package/lib/module/Mock/Components/NavigationButton.js +72 -0
- package/lib/module/Mock/Components/NavigationButton.js.map +1 -0
- package/lib/module/Mock/Components/Overlays.js +23 -0
- package/lib/module/Mock/Components/Overlays.js.map +1 -0
- package/lib/module/Mock/Components/SideMenu.js +29 -0
- package/lib/module/Mock/Components/SideMenu.js.map +1 -0
- package/lib/module/Mock/Components/Stack.js +18 -0
- package/lib/module/Mock/Components/Stack.js.map +1 -0
- package/lib/module/Mock/Components/TopBar.js +81 -0
- package/lib/module/Mock/Components/TopBar.js.map +1 -0
- package/lib/module/Mock/Layouts/BottomTabsNode.js +30 -0
- package/lib/module/Mock/Layouts/BottomTabsNode.js.map +1 -0
- package/lib/module/Mock/Layouts/ComponentNode.js +102 -0
- package/lib/module/Mock/Layouts/ComponentNode.js.map +1 -0
- package/lib/module/Mock/Layouts/LayoutNodeFactory.js +28 -0
- package/lib/module/Mock/Layouts/LayoutNodeFactory.js.map +1 -0
- package/lib/module/Mock/Layouts/Node.js +14 -0
- package/lib/module/Mock/Layouts/Node.js.map +1 -0
- package/lib/module/Mock/Layouts/ParentNode.js +66 -0
- package/lib/module/Mock/Layouts/ParentNode.js.map +1 -0
- package/lib/module/Mock/Layouts/SideMenu.js +72 -0
- package/lib/module/Mock/Layouts/SideMenu.js.map +1 -0
- package/lib/module/Mock/Layouts/StackNode.js +12 -0
- package/lib/module/Mock/Layouts/StackNode.js.map +1 -0
- package/lib/module/Mock/Stores/EventsStore.js +53 -0
- package/lib/module/Mock/Stores/EventsStore.js.map +1 -0
- package/lib/module/Mock/Stores/LayoutStore.js +176 -0
- package/lib/module/Mock/Stores/LayoutStore.js.map +1 -0
- package/lib/module/Mock/actions/layoutActions.js +19 -0
- package/lib/module/Mock/actions/layoutActions.js.map +1 -0
- package/lib/module/Mock/connect.js +8 -0
- package/lib/module/Mock/connect.js.map +1 -0
- package/lib/module/Mock/constants.js +5 -0
- package/lib/module/Mock/constants.js.map +1 -0
- package/lib/module/Mock/index.js +20 -0
- package/lib/module/Mock/index.js.map +1 -0
- package/lib/module/Mock/mocks/AppRegistryService.js +6 -0
- package/lib/module/Mock/mocks/AppRegistryService.js.map +1 -0
- package/lib/module/Mock/mocks/NativeCommandsSender.js +146 -0
- package/lib/module/Mock/mocks/NativeCommandsSender.js.map +1 -0
- package/lib/module/Mock/mocks/NativeEventsReceiver.js +103 -0
- package/lib/module/Mock/mocks/NativeEventsReceiver.js.map +1 -0
- package/lib/module/interfaces/Options.js.map +1 -1
- package/lib/typescript/Mock/Application.d.ts.map +1 -1
- package/lib/typescript/Mock/ComponentProps.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/BottomTabs.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/ComponentScreen.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/LayoutComponent.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/Modals.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/NavigationButton.d.ts +1 -1
- package/lib/typescript/Mock/Components/NavigationButton.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/Overlays.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/SideMenu.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/Stack.d.ts.map +1 -1
- package/lib/typescript/Mock/Components/TopBar.d.ts +1 -1
- package/lib/typescript/Mock/Components/TopBar.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/BottomTabsNode.d.ts +1 -1
- package/lib/typescript/Mock/Layouts/BottomTabsNode.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/ComponentNode.d.ts +1 -1
- package/lib/typescript/Mock/Layouts/ComponentNode.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/LayoutNodeFactory.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/Node.d.ts +1 -1
- package/lib/typescript/Mock/Layouts/Node.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/ParentNode.d.ts +2 -2
- package/lib/typescript/Mock/Layouts/ParentNode.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/SideMenu.d.ts +1 -1
- package/lib/typescript/Mock/Layouts/SideMenu.d.ts.map +1 -1
- package/lib/typescript/Mock/Layouts/StackNode.d.ts.map +1 -1
- package/lib/typescript/Mock/Stores/EventsStore.d.ts +3 -3
- package/lib/typescript/Mock/Stores/EventsStore.d.ts.map +1 -1
- package/lib/typescript/Mock/Stores/LayoutStore.d.ts.map +1 -1
- package/lib/typescript/Mock/actions/layoutActions.d.ts.map +1 -1
- package/lib/typescript/Mock/connect.d.ts.map +1 -1
- package/lib/typescript/Mock/constants.d.ts.map +1 -1
- package/lib/typescript/Mock/index.d.ts.map +1 -1
- package/lib/typescript/Mock/mocks/AppRegistryService.d.ts.map +1 -1
- package/lib/typescript/Mock/mocks/NativeCommandsSender.d.ts +2 -2
- package/lib/typescript/Mock/mocks/NativeCommandsSender.d.ts.map +1 -1
- package/lib/typescript/Mock/mocks/NativeEventsReceiver.d.ts +2 -2
- package/lib/typescript/Mock/mocks/NativeEventsReceiver.d.ts.map +1 -1
- package/lib/typescript/Navigation.d.ts.map +1 -0
- package/lib/typescript/NavigationDelegate.d.ts.map +1 -0
- package/lib/typescript/adapters/AppRegistryService.d.ts.map +1 -0
- package/lib/typescript/adapters/AssetResolver.d.ts.map +1 -0
- package/lib/typescript/adapters/ColorService.d.ts.map +1 -0
- package/lib/typescript/adapters/Constants.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeCommandsSender.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeEventsReceiver.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeEventsReceiver.mock.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeRNNTurboEventEmitter.d.ts.map +1 -0
- package/lib/typescript/adapters/NativeRNNTurboModule.d.ts.map +1 -0
- package/lib/typescript/adapters/TouchablePreview.d.ts.map +1 -0
- package/lib/typescript/adapters/UniqueIdProvider.d.ts.map +1 -0
- package/lib/typescript/commands/Commands.d.ts.map +1 -0
- package/lib/typescript/commands/Commands.test.d.ts.map +1 -0
- package/lib/typescript/commands/Deprecations.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeCrawler.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeCrawler.test.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeParser.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutTreeParser.test.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutType.d.ts.map +1 -0
- package/lib/typescript/commands/LayoutType.test.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsCrawler.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsCrawler.test.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsProcessor.d.ts.map +1 -0
- package/lib/typescript/commands/OptionsProcessor.test.d.ts.map +1 -0
- package/lib/typescript/components/ComponentRegistry.d.ts.map +1 -0
- package/lib/typescript/components/ComponentRegistry.test.d.ts.map +1 -0
- package/lib/typescript/components/ComponentWrapper.d.ts.map +1 -0
- package/lib/typescript/components/ComponentWrapper.test.d.ts.map +1 -0
- package/lib/typescript/components/Modal.d.ts.map +1 -0
- package/lib/typescript/components/Store.d.ts.map +1 -0
- package/lib/typescript/components/Store.test.d.ts.map +1 -0
- package/lib/typescript/events/CommandsObserver.d.ts.map +1 -0
- package/lib/typescript/events/CommandsObserver.test.d.ts.map +1 -0
- package/lib/typescript/events/ComponentEventsObserver.d.ts.map +1 -0
- package/lib/typescript/events/ComponentEventsObserver.test.d.ts.map +1 -0
- package/lib/typescript/events/EventsRegistry.d.ts.map +1 -0
- package/lib/typescript/events/EventsRegistry.test.d.ts.map +1 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/interfaces/CommandName.d.ts.map +1 -0
- package/lib/typescript/interfaces/ComponentEvents.d.ts.map +1 -0
- package/lib/typescript/interfaces/EventSubscription.d.ts.map +1 -0
- package/lib/typescript/interfaces/Events.d.ts.map +1 -0
- package/lib/typescript/interfaces/Layout.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationComponent.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationComponentListener.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationComponentProps.d.ts.map +1 -0
- package/lib/typescript/interfaces/NavigationFunctionComponent.d.ts.map +1 -0
- package/lib/typescript/{src/interfaces → interfaces}/Options.d.ts +29 -0
- package/lib/typescript/interfaces/Options.d.ts.map +1 -0
- package/lib/typescript/interfaces/ProcessorSubscription.d.ts.map +1 -0
- package/lib/typescript/interfaces/Processors.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessor.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessor.test.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessorsStore.d.ts.map +1 -0
- package/lib/typescript/processors/LayoutProcessorsStore.test.d.ts.map +1 -0
- package/lib/typescript/processors/OptionProcessorsStore.d.ts.map +1 -0
- package/lib/typescript/processors/OptionProcessorsStore.test.d.ts.map +1 -0
- package/lib/typescript/types.d.ts.map +1 -0
- package/package.json +12 -6
- package/src/ARCHITECTURE.md +301 -0
- package/src/Mock/Application.tsx +30 -0
- package/src/Mock/ComponentProps.tsx +6 -0
- package/src/Mock/Components/BottomTabs.tsx +14 -0
- package/src/Mock/Components/ComponentScreen.tsx +107 -0
- package/src/Mock/Components/LayoutComponent.tsx +37 -0
- package/src/Mock/Components/Modals.tsx +22 -0
- package/src/Mock/Components/NavigationButton.tsx +86 -0
- package/src/Mock/Components/Overlays.tsx +23 -0
- package/src/Mock/Components/SideMenu.tsx +27 -0
- package/src/Mock/Components/Stack.tsx +16 -0
- package/src/Mock/Components/TopBar.tsx +96 -0
- package/src/Mock/Layouts/BottomTabsNode.ts +34 -0
- package/src/Mock/Layouts/ComponentNode.ts +124 -0
- package/src/Mock/Layouts/LayoutNodeFactory.ts +31 -0
- package/src/Mock/Layouts/Node.ts +35 -0
- package/src/Mock/Layouts/ParentNode.ts +86 -0
- package/src/Mock/Layouts/SideMenu.ts +87 -0
- package/src/Mock/Layouts/StackNode.ts +11 -0
- package/src/Mock/Stores/EventsStore.ts +68 -0
- package/src/Mock/Stores/LayoutStore.ts +200 -0
- package/src/Mock/actions/layoutActions.ts +21 -0
- package/src/Mock/connect.ts +6 -0
- package/src/Mock/constants.ts +2 -0
- package/src/Mock/index.ts +16 -0
- package/src/Mock/mocks/AppRegistryService.ts +5 -0
- package/src/Mock/mocks/NativeCommandsSender.tsx +168 -0
- package/src/Mock/mocks/NativeEventsReceiver.ts +162 -0
- package/src/interfaces/Options.ts +30 -0
- package/lib/typescript/src/Navigation.d.ts.map +0 -1
- package/lib/typescript/src/NavigationDelegate.d.ts.map +0 -1
- package/lib/typescript/src/adapters/AppRegistryService.d.ts.map +0 -1
- package/lib/typescript/src/adapters/AssetResolver.d.ts.map +0 -1
- package/lib/typescript/src/adapters/ColorService.d.ts.map +0 -1
- package/lib/typescript/src/adapters/Constants.d.ts.map +0 -1
- package/lib/typescript/src/adapters/NativeCommandsSender.d.ts.map +0 -1
- package/lib/typescript/src/adapters/NativeEventsReceiver.d.ts.map +0 -1
- package/lib/typescript/src/adapters/NativeEventsReceiver.mock.d.ts.map +0 -1
- package/lib/typescript/src/adapters/NativeRNNTurboEventEmitter.d.ts.map +0 -1
- package/lib/typescript/src/adapters/NativeRNNTurboModule.d.ts.map +0 -1
- package/lib/typescript/src/adapters/TouchablePreview.d.ts.map +0 -1
- package/lib/typescript/src/adapters/UniqueIdProvider.d.ts.map +0 -1
- package/lib/typescript/src/commands/Commands.d.ts.map +0 -1
- package/lib/typescript/src/commands/Commands.test.d.ts.map +0 -1
- package/lib/typescript/src/commands/Deprecations.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutTreeCrawler.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutTreeCrawler.test.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutTreeParser.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutTreeParser.test.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutType.d.ts.map +0 -1
- package/lib/typescript/src/commands/LayoutType.test.d.ts.map +0 -1
- package/lib/typescript/src/commands/OptionsCrawler.d.ts.map +0 -1
- package/lib/typescript/src/commands/OptionsCrawler.test.d.ts.map +0 -1
- package/lib/typescript/src/commands/OptionsProcessor.d.ts.map +0 -1
- package/lib/typescript/src/commands/OptionsProcessor.test.d.ts.map +0 -1
- package/lib/typescript/src/components/ComponentRegistry.d.ts.map +0 -1
- package/lib/typescript/src/components/ComponentRegistry.test.d.ts.map +0 -1
- package/lib/typescript/src/components/ComponentWrapper.d.ts.map +0 -1
- package/lib/typescript/src/components/ComponentWrapper.test.d.ts.map +0 -1
- package/lib/typescript/src/components/Modal.d.ts.map +0 -1
- package/lib/typescript/src/components/Store.d.ts.map +0 -1
- package/lib/typescript/src/components/Store.test.d.ts.map +0 -1
- package/lib/typescript/src/events/CommandsObserver.d.ts.map +0 -1
- package/lib/typescript/src/events/CommandsObserver.test.d.ts.map +0 -1
- package/lib/typescript/src/events/ComponentEventsObserver.d.ts.map +0 -1
- package/lib/typescript/src/events/ComponentEventsObserver.test.d.ts.map +0 -1
- package/lib/typescript/src/events/EventsRegistry.d.ts.map +0 -1
- package/lib/typescript/src/events/EventsRegistry.test.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/CommandName.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/ComponentEvents.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/EventSubscription.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/Events.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/Layout.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/NavigationComponent.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/NavigationComponentListener.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/NavigationComponentProps.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/NavigationFunctionComponent.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/Options.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/ProcessorSubscription.d.ts.map +0 -1
- package/lib/typescript/src/interfaces/Processors.d.ts.map +0 -1
- package/lib/typescript/src/processors/LayoutProcessor.d.ts.map +0 -1
- package/lib/typescript/src/processors/LayoutProcessor.test.d.ts.map +0 -1
- package/lib/typescript/src/processors/LayoutProcessorsStore.d.ts.map +0 -1
- package/lib/typescript/src/processors/LayoutProcessorsStore.test.d.ts.map +0 -1
- package/lib/typescript/src/processors/OptionProcessorsStore.d.ts.map +0 -1
- package/lib/typescript/src/processors/OptionProcessorsStore.test.d.ts.map +0 -1
- package/lib/typescript/src/types.d.ts.map +0 -1
- /package/lib/typescript/{src/Navigation.d.ts → Navigation.d.ts} +0 -0
- /package/lib/typescript/{src/NavigationDelegate.d.ts → NavigationDelegate.d.ts} +0 -0
- /package/lib/typescript/{src/adapters → adapters}/AppRegistryService.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/AssetResolver.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/ColorService.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/Constants.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/NativeCommandsSender.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/NativeEventsReceiver.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/NativeEventsReceiver.mock.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/NativeRNNTurboEventEmitter.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/NativeRNNTurboModule.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/TouchablePreview.d.ts +0 -0
- /package/lib/typescript/{src/adapters → adapters}/UniqueIdProvider.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/Commands.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/Commands.test.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/Deprecations.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutTreeCrawler.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutTreeCrawler.test.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutTreeParser.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutTreeParser.test.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutType.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/LayoutType.test.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/OptionsCrawler.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/OptionsCrawler.test.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/OptionsProcessor.d.ts +0 -0
- /package/lib/typescript/{src/commands → commands}/OptionsProcessor.test.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/ComponentRegistry.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/ComponentRegistry.test.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/ComponentWrapper.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/ComponentWrapper.test.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/Modal.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/Store.d.ts +0 -0
- /package/lib/typescript/{src/components → components}/Store.test.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/CommandsObserver.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/CommandsObserver.test.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/ComponentEventsObserver.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/ComponentEventsObserver.test.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/EventsRegistry.d.ts +0 -0
- /package/lib/typescript/{src/events → events}/EventsRegistry.test.d.ts +0 -0
- /package/lib/typescript/{src/index.d.ts → index.d.ts} +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/CommandName.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/ComponentEvents.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/EventSubscription.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/Events.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/Layout.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/NavigationComponent.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/NavigationComponentListener.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/NavigationComponentProps.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/NavigationFunctionComponent.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/ProcessorSubscription.d.ts +0 -0
- /package/lib/typescript/{src/interfaces → interfaces}/Processors.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/LayoutProcessor.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/LayoutProcessor.test.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/LayoutProcessorsStore.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/LayoutProcessorsStore.test.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/OptionProcessorsStore.d.ts +0 -0
- /package/lib/typescript/{src/processors → processors}/OptionProcessorsStore.test.d.ts +0 -0
- /package/lib/typescript/{src/types.d.ts → types.d.ts} +0 -0
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
# Android Native Architecture
|
|
2
|
+
|
|
3
|
+
The Android implementation provides native navigation using Views and ViewGroups (not Fragments), coordinated through a TurboModule that receives commands from JavaScript.
|
|
4
|
+
|
|
5
|
+
## App Integration
|
|
6
|
+
|
|
7
|
+
### NavigationApplication
|
|
8
|
+
**File**: `NavigationApplication.java`
|
|
9
|
+
|
|
10
|
+
Abstract Application class that user's MainApplication must extend:
|
|
11
|
+
|
|
12
|
+
```kotlin
|
|
13
|
+
// MainApplication.kt - User extends NavigationApplication
|
|
14
|
+
class MainApplication : NavigationApplication() {
|
|
15
|
+
override val reactNativeHost: ReactNativeHost
|
|
16
|
+
get() = NavigationReactNativeHost(this) // Must use NavigationReactNativeHost
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**What NavigationApplication does:**
|
|
21
|
+
- Initializes SoLoader
|
|
22
|
+
- Provides `ReactGateway` singleton for React lifecycle
|
|
23
|
+
- Offers `registerExternalComponent()` for native screens
|
|
24
|
+
|
|
25
|
+
### NavigationActivity
|
|
26
|
+
**File**: `NavigationActivity.java`
|
|
27
|
+
|
|
28
|
+
Base Activity that user's MainActivity must extend:
|
|
29
|
+
|
|
30
|
+
```kotlin
|
|
31
|
+
// MainActivity.kt - User extends NavigationActivity
|
|
32
|
+
class MainActivity : NavigationActivity() {
|
|
33
|
+
// No getMainComponentName() needed - navigation handles root
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**What NavigationActivity does:**
|
|
38
|
+
- Creates `Navigator` with root, modal, and overlay layouts
|
|
39
|
+
- Manages back press via `OnBackPressedCallback`
|
|
40
|
+
- Coordinates React lifecycle with activity lifecycle
|
|
41
|
+
|
|
42
|
+
### NavigationReactNativeHost
|
|
43
|
+
**File**: `react/NavigationReactNativeHost.kt`
|
|
44
|
+
|
|
45
|
+
Custom ReactNativeHost that integrates with navigation:
|
|
46
|
+
- Used instead of `DefaultReactNativeHost`
|
|
47
|
+
- Provides proper module registration for navigation
|
|
48
|
+
|
|
49
|
+
### Autolink Script (`npx rnn-link`)
|
|
50
|
+
|
|
51
|
+
The `autolink/postlink/postLinkAndroid.js` script automates setup:
|
|
52
|
+
|
|
53
|
+
| Linker | What it does |
|
|
54
|
+
|--------|--------------|
|
|
55
|
+
| `ApplicationLinker` | Changes MainApplication to extend `NavigationApplication`, uses `NavigationReactNativeHost`, removes SoLoader.init() |
|
|
56
|
+
| `ActivityLinker` | Changes MainActivity to extend `NavigationActivity`, removes `getMainComponentName()` |
|
|
57
|
+
| `GradleLinker` | Updates build.gradle if needed |
|
|
58
|
+
|
|
59
|
+
**ApplicationLinker transformations:**
|
|
60
|
+
- `class MainApplication : Application(), ReactApplication` → `class MainApplication : NavigationApplication()`
|
|
61
|
+
- `DefaultReactNativeHost(this)` → `NavigationReactNativeHost(this)`
|
|
62
|
+
- Removes `SoLoader.init()` (NavigationApplication handles it)
|
|
63
|
+
- Removes new architecture entry point load block
|
|
64
|
+
|
|
65
|
+
**ActivityLinker transformations:**
|
|
66
|
+
- `class MainActivity : ReactActivity()` → `class MainActivity : NavigationActivity()`
|
|
67
|
+
- Removes `getMainComponentName()` override
|
|
68
|
+
- Removes `createReactActivityDelegate()` override
|
|
69
|
+
|
|
70
|
+
## Directory Structure
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
android/src/main/java/com/reactnativenavigation/
|
|
74
|
+
├── NavigationActivity.java # Main Activity entry point
|
|
75
|
+
├── NavigationApplication.java # Application class
|
|
76
|
+
├── NavigationPackage.kt # React package registration
|
|
77
|
+
├── react/ # React bridge layer
|
|
78
|
+
│ ├── NavigationTurboModule.kt # TurboModule implementation
|
|
79
|
+
│ ├── ReactGateway.java # React lifecycle management
|
|
80
|
+
│ └── events/
|
|
81
|
+
│ └── EventEmitter.java # Event emission to JS
|
|
82
|
+
├── options/ # Options parsing and factories
|
|
83
|
+
│ ├── LayoutFactory.java # Creates ViewControllers from layout nodes
|
|
84
|
+
│ └── Options.java # Options model
|
|
85
|
+
├── viewcontrollers/ # ViewController hierarchy
|
|
86
|
+
│ ├── ViewController.java # Base class
|
|
87
|
+
│ ├── ChildController.java # With presenter support
|
|
88
|
+
│ ├── ParentController.java # Container controllers
|
|
89
|
+
│ ├── stack/ # Stack navigation
|
|
90
|
+
│ ├── bottomtabs/ # Bottom tabs
|
|
91
|
+
│ ├── toptabs/ # Top tabs (lowercase)
|
|
92
|
+
│ ├── sidemenu/ # Side menu/drawer
|
|
93
|
+
│ ├── modal/ # Modal management
|
|
94
|
+
│ └── externalcomponent/ # Native component support
|
|
95
|
+
├── views/ # UI View implementations
|
|
96
|
+
├── utils/ # Utilities
|
|
97
|
+
└── hierarchy/ # Root layout management
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Bridge Architecture
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
┌────────────────────────────────────────────────────────────┐
|
|
104
|
+
│ JavaScript (TurboModule) │
|
|
105
|
+
└─────────────────────────┬──────────────────────────────────┘
|
|
106
|
+
│
|
|
107
|
+
┌─────────────────────────▼──────────────────────────────────┐
|
|
108
|
+
│ NavigationTurboModule.kt │
|
|
109
|
+
│ - setRoot, push, pop, showModal, dismissModal, etc. │
|
|
110
|
+
└─────────────────────────┬──────────────────────────────────┘
|
|
111
|
+
│
|
|
112
|
+
┌─────────────────────────▼──────────────────────────────────┐
|
|
113
|
+
│ Navigator (Root ViewController) │
|
|
114
|
+
│ - Manages root, modals, overlays │
|
|
115
|
+
│ - Coordinates LayoutFactory │
|
|
116
|
+
└──────┬──────────────┬──────────────┬──────────────┬────────┘
|
|
117
|
+
│ │ │ │
|
|
118
|
+
┌──────▼─────┐ ┌──────▼─────┐ ┌──────▼─────┐ ┌─────▼──────┐
|
|
119
|
+
│ModalStack │ │OverlayMgr │ │LayoutFactory│ │EventEmitter│
|
|
120
|
+
└────────────┘ └────────────┘ └────────────┘ └────────────┘
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Entry Points
|
|
124
|
+
|
|
125
|
+
### NavigationApplication
|
|
126
|
+
Abstract Application class that apps extend:
|
|
127
|
+
- Manages `ReactGateway` singleton
|
|
128
|
+
- Initializes SoLoader
|
|
129
|
+
- Provides `registerExternalComponent()` for native screens
|
|
130
|
+
|
|
131
|
+
### NavigationActivity
|
|
132
|
+
Main Activity containing all navigation:
|
|
133
|
+
- Creates `Navigator` with three CoordinatorLayouts:
|
|
134
|
+
- `rootLayout` - Main navigation content
|
|
135
|
+
- `modalsLayout` - Modal stack
|
|
136
|
+
- `overlaysLayout` - Overlays (highest z-order)
|
|
137
|
+
- Handles back press via `OnBackPressedCallback`
|
|
138
|
+
- Coordinates activity lifecycle with React
|
|
139
|
+
|
|
140
|
+
### NavigationTurboModule
|
|
141
|
+
TurboModule implementation (Kotlin, ~300 lines):
|
|
142
|
+
|
|
143
|
+
```kotlin
|
|
144
|
+
@ReactMethod
|
|
145
|
+
fun setRoot(commandId: String, layout: ReadableMap, promise: Promise)
|
|
146
|
+
|
|
147
|
+
@ReactMethod
|
|
148
|
+
fun push(commandId: String, componentId: String, layout: ReadableMap, promise: Promise)
|
|
149
|
+
|
|
150
|
+
@ReactMethod
|
|
151
|
+
fun showModal(commandId: String, layout: ReadableMap, promise: Promise)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
All commands execute on UI thread via `UiThread.post()`.
|
|
155
|
+
|
|
156
|
+
## ViewController Hierarchy
|
|
157
|
+
|
|
158
|
+
**Note**: Android implementation does NOT use Fragments - it's purely View-based.
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
ViewController (abstract)
|
|
162
|
+
│ - Base for all navigation controllers
|
|
163
|
+
│ - Manages view creation and lifecycle
|
|
164
|
+
│ - Handles options and back press
|
|
165
|
+
│
|
|
166
|
+
├── ChildController
|
|
167
|
+
│ │ - Adds Presenter support
|
|
168
|
+
│ │
|
|
169
|
+
│ ├── ComponentViewController
|
|
170
|
+
│ │ - Renders React components via ReactView
|
|
171
|
+
│ │
|
|
172
|
+
│ └── ExternalComponentViewController
|
|
173
|
+
│ - Wraps native Android views
|
|
174
|
+
│
|
|
175
|
+
└── ParentController (extends ChildController)
|
|
176
|
+
- Container for child controllers
|
|
177
|
+
│
|
|
178
|
+
├── StackController
|
|
179
|
+
│ - Push/pop navigation
|
|
180
|
+
│ - Uses IdStack<ViewController>
|
|
181
|
+
│
|
|
182
|
+
├── BottomTabsController
|
|
183
|
+
│ - UITabBarController equivalent
|
|
184
|
+
│ - Uses AHBottomNavigation
|
|
185
|
+
│
|
|
186
|
+
├── TopTabsController
|
|
187
|
+
│ - Horizontal ViewPager tabs
|
|
188
|
+
│
|
|
189
|
+
├── SideMenuController
|
|
190
|
+
│ - DrawerLayout-based drawer
|
|
191
|
+
│
|
|
192
|
+
└── Navigator
|
|
193
|
+
- Root controller
|
|
194
|
+
- Manages modals and overlays
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Core Classes
|
|
198
|
+
|
|
199
|
+
### ViewController (Base)
|
|
200
|
+
**File**: `viewcontrollers/viewcontroller/ViewController.java` (~500 lines)
|
|
201
|
+
|
|
202
|
+
Abstract base for all navigation controllers:
|
|
203
|
+
|
|
204
|
+
```java
|
|
205
|
+
public abstract class ViewController<T extends ViewGroup> {
|
|
206
|
+
protected abstract T createView(); // Subclasses create views
|
|
207
|
+
|
|
208
|
+
public void onViewWillAppear() { }
|
|
209
|
+
public void onViewDidAppear() { }
|
|
210
|
+
public void onViewDisappear() { }
|
|
211
|
+
|
|
212
|
+
public void mergeOptions(Options options) { }
|
|
213
|
+
public void applyOptions(Options options) { }
|
|
214
|
+
public boolean handleBack(CommandListener listener) { }
|
|
215
|
+
public void destroy() { }
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
### Navigator (Root)
|
|
220
|
+
**File**: `viewcontrollers/navigator/Navigator.java`
|
|
221
|
+
|
|
222
|
+
Root ViewController managing:
|
|
223
|
+
- Root content hierarchy
|
|
224
|
+
- Modal stack (`ModalStack`)
|
|
225
|
+
- Overlay manager (`OverlayManager`)
|
|
226
|
+
- Component lookup by ID
|
|
227
|
+
|
|
228
|
+
### LayoutFactory
|
|
229
|
+
**File**: `options/LayoutFactory.java`
|
|
230
|
+
|
|
231
|
+
Factory creating ViewControllers from LayoutNode. Owned by `NavigationTurboModule` and used to build the view controller hierarchy when commands are received from JavaScript.
|
|
232
|
+
|
|
233
|
+
```java
|
|
234
|
+
public ViewController create(LayoutNode node) {
|
|
235
|
+
switch (node.type) {
|
|
236
|
+
case Component: return createComponent(node);
|
|
237
|
+
case Stack: return createStack(node);
|
|
238
|
+
case BottomTabs: return createBottomTabs(node);
|
|
239
|
+
case SideMenuRoot: return createSideMenuRoot(node);
|
|
240
|
+
case SideMenuCenter: return createSideMenuContent(node);
|
|
241
|
+
case SideMenuLeft: return createSideMenuLeft(node);
|
|
242
|
+
case SideMenuRight: return createSideMenuRight(node);
|
|
243
|
+
case TopTabs: return createTopTabs(node);
|
|
244
|
+
// Note: SplitView is iOS-only, not implemented on Android
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
## Navigation Types
|
|
250
|
+
|
|
251
|
+
### Stack Navigation (StackController)
|
|
252
|
+
**Files**: `viewcontrollers/stack/`
|
|
253
|
+
|
|
254
|
+
- View: `StackLayout` (CoordinatorLayout with TopBar)
|
|
255
|
+
- Internal stack: `IdStack<ViewController<?>>`
|
|
256
|
+
- Components: `TopBarController`, `StackAnimator`, `StackPresenter`, `FabPresenter`
|
|
257
|
+
|
|
258
|
+
Operations:
|
|
259
|
+
- `push(viewController, listener)`
|
|
260
|
+
- `pop(options, listener)`
|
|
261
|
+
- `popTo(target, options, listener)`
|
|
262
|
+
- `popToRoot(options, listener)`
|
|
263
|
+
- `setRoot(children, listener)`
|
|
264
|
+
|
|
265
|
+
### Bottom Tabs (BottomTabsController)
|
|
266
|
+
**Files**: `viewcontrollers/bottomtabs/`
|
|
267
|
+
|
|
268
|
+
- View: `BottomTabsLayout` (CoordinatorLayout with BottomTabs)
|
|
269
|
+
- Uses `AHBottomNavigation` library
|
|
270
|
+
- Components: `BottomTabsPresenter`, `BottomTabPresenter`, `BottomTabsAnimator`
|
|
271
|
+
|
|
272
|
+
Attachment Modes:
|
|
273
|
+
- `TogetherAttacher` - Load all tabs immediately
|
|
274
|
+
- `OnSwitchToTabAttacher` - Lazy load on selection
|
|
275
|
+
- `AfterInitialTabAttacher` - Load initial + others in background
|
|
276
|
+
|
|
277
|
+
### Side Menu (SideMenuController)
|
|
278
|
+
**Files**: `viewcontrollers/sidemenu/`
|
|
279
|
+
|
|
280
|
+
- View: `SideMenuRoot` (DrawerLayout-based)
|
|
281
|
+
- Children: Center, Left, Right controllers
|
|
282
|
+
- `SideMenuPresenter` for styling
|
|
283
|
+
|
|
284
|
+
### Top Tabs (TopTabsController)
|
|
285
|
+
**Files**: `viewcontrollers/toptabs/`
|
|
286
|
+
|
|
287
|
+
- View: `TopTabsViewPager` (ViewPager-based)
|
|
288
|
+
- `TopTabsLayoutCreator` for view creation
|
|
289
|
+
|
|
290
|
+
### Modals (ModalStack)
|
|
291
|
+
**Files**: `viewcontrollers/modal/`
|
|
292
|
+
|
|
293
|
+
Not a ViewController - manages modal presentation:
|
|
294
|
+
- `ModalPresenter` - Show/dismiss with animations
|
|
295
|
+
- `ModalAnimator` (Kotlin) - Animation handling
|
|
296
|
+
- Stack of modals with lifecycle management
|
|
297
|
+
|
|
298
|
+
### Overlays (OverlayManager)
|
|
299
|
+
**File**: `viewcontrollers/overlay/OverlayManager.kt`
|
|
300
|
+
|
|
301
|
+
Registry of active overlays:
|
|
302
|
+
- Show/dismiss by component ID
|
|
303
|
+
- Configuration change handling
|
|
304
|
+
- Host pause/resume lifecycle
|
|
305
|
+
|
|
306
|
+
## React Component Rendering
|
|
307
|
+
|
|
308
|
+
### ComponentViewController
|
|
309
|
+
Manages React component lifecycle:
|
|
310
|
+
- Creates `ComponentLayout` view
|
|
311
|
+
- Initializes `ReactView` with ReactSurface
|
|
312
|
+
- Emits lifecycle events to JS
|
|
313
|
+
- Handles scroll events and status bar
|
|
314
|
+
|
|
315
|
+
### ReactView
|
|
316
|
+
**File**: `react/ReactView.java`
|
|
317
|
+
|
|
318
|
+
Extends FrameLayout, wraps `ReactSurface`:
|
|
319
|
+
- `start()` - Attach surface to React instance
|
|
320
|
+
- `destroy()` - Clean up React surface
|
|
321
|
+
- `sendComponentWillStart()` - Emit event to JS
|
|
322
|
+
- `isReady()` - Check surface attachment
|
|
323
|
+
|
|
324
|
+
## Event Emission
|
|
325
|
+
|
|
326
|
+
### EventEmitter
|
|
327
|
+
**File**: `react/events/EventEmitter.java`
|
|
328
|
+
|
|
329
|
+
Events sent to JavaScript:
|
|
330
|
+
|
|
331
|
+
| Event | Description |
|
|
332
|
+
|-------|-------------|
|
|
333
|
+
| `RNN.AppLaunched` | App initialization complete |
|
|
334
|
+
| `RNN.ComponentDidAppear` | Component visible |
|
|
335
|
+
| `RNN.ComponentWillAppear` | About to become visible |
|
|
336
|
+
| `RNN.ComponentDidDisappear` | Component hidden |
|
|
337
|
+
| `RNN.NavigationButtonPressed` | TopBar button tapped |
|
|
338
|
+
| `RNN.BottomTabSelected` | Tab selection changed |
|
|
339
|
+
| `RNN.BottomTabPressed` | Tab pressed (even if selected) |
|
|
340
|
+
| `RNN.ModalDismissed` | Modal was dismissed |
|
|
341
|
+
| `RNN.ScreenPopped` | Screen removed from stack |
|
|
342
|
+
| `RNN.CommandCompleted` | Navigation command finished |
|
|
343
|
+
|
|
344
|
+
## Options System
|
|
345
|
+
|
|
346
|
+
### Options Class
|
|
347
|
+
**File**: `options/Options.java`
|
|
348
|
+
|
|
349
|
+
```java
|
|
350
|
+
public class Options {
|
|
351
|
+
public TopBarOptions topBar;
|
|
352
|
+
public TopTabsOptions topTabs;
|
|
353
|
+
public BottomTabsOptions bottomTabsOptions;
|
|
354
|
+
public BottomTabOptions bottomTabOptions;
|
|
355
|
+
public OverlayOptions overlayOptions;
|
|
356
|
+
public FabOptions fabOptions;
|
|
357
|
+
public AnimationsOptions animations;
|
|
358
|
+
public SideMenuRootOptions sideMenuRootOptions;
|
|
359
|
+
public ModalOptions modal;
|
|
360
|
+
public StatusBarOptions statusBar;
|
|
361
|
+
public NavigationBarOptions navigationBar;
|
|
362
|
+
public LayoutOptions layout;
|
|
363
|
+
public HardwareBackButtonOptions hardwareBack;
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Options Flow
|
|
368
|
+
1. **Parse**: JSON from JS → Options object via JSONParser
|
|
369
|
+
2. **Merge**: Default → Screen → Component options
|
|
370
|
+
3. **Apply**: Presenter applies to views
|
|
371
|
+
|
|
372
|
+
## Presenter Pattern
|
|
373
|
+
|
|
374
|
+
Each ViewController has a Presenter:
|
|
375
|
+
|
|
376
|
+
| ViewController | Presenter |
|
|
377
|
+
|---------------|-----------|
|
|
378
|
+
| StackController | StackPresenter |
|
|
379
|
+
| BottomTabsController | BottomTabsPresenter + BottomTabPresenter |
|
|
380
|
+
| ComponentViewController | ComponentPresenter |
|
|
381
|
+
| SideMenuController | SideMenuPresenter |
|
|
382
|
+
| Navigator | RootPresenter |
|
|
383
|
+
|
|
384
|
+
### Presenter Base
|
|
385
|
+
**File**: `viewcontrollers/viewcontroller/Presenter.java`
|
|
386
|
+
|
|
387
|
+
Handles:
|
|
388
|
+
- Orientation changes
|
|
389
|
+
- Status bar styling
|
|
390
|
+
- Navigation bar styling
|
|
391
|
+
- Layout parameters
|
|
392
|
+
|
|
393
|
+
## Animation System
|
|
394
|
+
|
|
395
|
+
### Animators (Kotlin)
|
|
396
|
+
- `StackAnimator.kt` - Push, pop, setRoot animations
|
|
397
|
+
- `ModalAnimator.kt` - Modal show/dismiss
|
|
398
|
+
- `BottomTabsAnimator.kt` - Tab transitions
|
|
399
|
+
- `TopBarAppearanceAnimator.kt` - Top bar changes
|
|
400
|
+
|
|
401
|
+
### Element Transitions
|
|
402
|
+
Via `TransitionAnimatorCreator.kt`:
|
|
403
|
+
- Position, scale, rotation animations
|
|
404
|
+
- Color transitions
|
|
405
|
+
- Corner radius animations
|
|
406
|
+
- Shared element support
|
|
407
|
+
|
|
408
|
+
## Activity Lifecycle
|
|
409
|
+
|
|
410
|
+
```java
|
|
411
|
+
onCreate() // Create Navigator, initialize React
|
|
412
|
+
onPostCreate() // Set content layout
|
|
413
|
+
onResume() // React host resume, event emitter setup
|
|
414
|
+
onPause() // React host pause
|
|
415
|
+
onDestroy() // Clean up Navigator
|
|
416
|
+
onConfigurationChanged() // Handle orientation, locale
|
|
417
|
+
onNewIntent() // Process deep links
|
|
418
|
+
onActivityResult() // Handle permissions
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
## ViewController Lifecycle
|
|
422
|
+
|
|
423
|
+
```
|
|
424
|
+
View creation
|
|
425
|
+
↓
|
|
426
|
+
onViewWillAppear() // Register with registry
|
|
427
|
+
↓
|
|
428
|
+
onViewDidAppear() // Emit event to JS
|
|
429
|
+
↓
|
|
430
|
+
[visible]
|
|
431
|
+
↓
|
|
432
|
+
onViewWillDisappear()
|
|
433
|
+
↓
|
|
434
|
+
onViewDisappear() // Unregister from registry
|
|
435
|
+
↓
|
|
436
|
+
destroy() // Complete cleanup
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
## Key Files Reference
|
|
440
|
+
|
|
441
|
+
All paths relative to `android/src/main/java/com/reactnativenavigation/`:
|
|
442
|
+
|
|
443
|
+
| File | Path | Purpose |
|
|
444
|
+
|------|------|---------|
|
|
445
|
+
| NavigationActivity.java | `.` | Main Activity |
|
|
446
|
+
| NavigationApplication.java | `.` | Application class |
|
|
447
|
+
| NavigationTurboModule.kt | `react/` | JS bridge |
|
|
448
|
+
| Navigator.java | `viewcontrollers/navigator/` | Root controller |
|
|
449
|
+
| ViewController.java | `viewcontrollers/viewcontroller/` | Base class |
|
|
450
|
+
| StackController.java | `viewcontrollers/stack/` | Stack navigation |
|
|
451
|
+
| BottomTabsController.java | `viewcontrollers/bottomtabs/` | Tab navigation |
|
|
452
|
+
| LayoutFactory.java | `options/` | Controller factory |
|
|
453
|
+
| Options.java | `options/` | Options model |
|
|
454
|
+
| Presenter.java | `viewcontrollers/viewcontroller/` | Base presenter |
|
|
455
|
+
| EventEmitter.java | `react/events/` | JS events |
|
|
456
|
+
| ReactView.java | `react/` | React component wrapper |
|
|
457
|
+
| StackAnimator.kt | `viewcontrollers/stack/` | Stack animations |
|
|
458
|
+
| ModalStack.java | `viewcontrollers/modal/` | Modal management |
|
|
@@ -8,12 +8,12 @@ import com.reactnativenavigation.options.params.DensityPixel
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class IconBackgroundDrawable(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
private val wrapped: Drawable,
|
|
12
|
+
private val cornerRadius: DensityPixel,
|
|
13
|
+
private val backgroundWidth: Int,
|
|
14
|
+
private val backgroundHeight: Int,
|
|
15
|
+
private val iconColor: Int?,
|
|
16
|
+
val backgroundColor: Int?
|
|
17
17
|
) : Drawable() {
|
|
18
18
|
private val path: Path = Path()
|
|
19
19
|
private val bitmapPaint = Paint().apply {
|
|
@@ -56,28 +56,31 @@ class IconBackgroundDrawable(
|
|
|
56
56
|
canvas.drawBitmap(wrapped.toBitmap(), null, bitmapRect, bitmapPaint)
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
override fun getIntrinsicWidth(): Int = backgroundWidth
|
|
60
|
+
override fun getIntrinsicHeight(): Int = backgroundHeight
|
|
61
|
+
|
|
59
62
|
override fun setBounds(l: Int, t: Int, r: Int, b: Int) {
|
|
60
|
-
updatePath(RectF(
|
|
61
|
-
super.setBounds(l, t, backgroundWidth, backgroundHeight)
|
|
63
|
+
updatePath(RectF(0f, 0f, backgroundWidth.toFloat(), backgroundHeight.toFloat()))
|
|
64
|
+
super.setBounds(l, t, l + backgroundWidth, t + backgroundHeight)
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
override fun setBounds(r: Rect) {
|
|
65
|
-
r.right = backgroundWidth
|
|
66
|
-
r.bottom = backgroundHeight
|
|
67
|
-
updatePath(RectF(
|
|
68
|
+
r.right = r.left + backgroundWidth
|
|
69
|
+
r.bottom = r.top + backgroundHeight
|
|
70
|
+
updatePath(RectF(0f, 0f, backgroundWidth.toFloat(), backgroundHeight.toFloat()))
|
|
68
71
|
super.setBounds(r)
|
|
69
72
|
}
|
|
70
73
|
|
|
71
74
|
override fun onBoundsChange(bounds: Rect) {
|
|
72
75
|
if (bounds != null) {
|
|
73
76
|
backgroundRect = Rect((bounds.width() - backgroundWidth) / 2,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
(bounds.height() - backgroundHeight) / 2,
|
|
78
|
+
bounds.width() - (bounds.width() - backgroundWidth) / 2,
|
|
79
|
+
bounds.height() - (bounds.height() - backgroundHeight) / 2)
|
|
77
80
|
bitmapRect = Rect((bounds.width() - bitmapWidth) / 2,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
+
(bounds.height() - bitmapHeight) / 2,
|
|
82
|
+
bounds.width() - (bounds.width() - bitmapWidth) / 2,
|
|
83
|
+
bounds.height() - (bounds.height() - bitmapHeight) / 2)
|
|
81
84
|
}
|
|
82
85
|
super.onBoundsChange(bounds)
|
|
83
86
|
}
|