├── .gitattributes
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── art
│ ├── diagram_readme.png
│ └── diagram_readme.xml
└── workflows
│ ├── pull_request.yml
│ └── test.sh
├── .gitignore
├── .idea
├── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
├── dictionaries
│ └── nhaarman.xml
├── encodings.xml
├── icon.png
├── icon_dark.png
├── inspectionProfiles
│ ├── Project_Default.xml
│ ├── ktlint.xml
│ └── profiles_settings.xml
├── misc.xml
├── runConfigurations
│ ├── acorn_tests.xml
│ └── ext_acorn_tests.xml
└── vcs.xml
├── .ops
├── git.gradle
├── pitest.gradle
├── publishing-android.gradle
├── publishing-base.gradle
├── publishing-kotlin.gradle
└── testing.gradle
├── LICENSE
├── README.md
├── build.gradle
├── core
├── acorn-android-core
│ ├── build.gradle
│ ├── gradle.properties
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── android
│ │ ├── presentation
│ │ └── ViewController.kt
│ │ └── transition
│ │ └── SceneTransition.kt
└── acorn-core
│ ├── build.gradle
│ ├── gradle.properties
│ └── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ ├── navigation
│ │ ├── CompositeDisposableHandle.kt
│ │ ├── DisposableHandle.kt
│ │ ├── Navigator.kt
│ │ ├── SavableNavigator.kt
│ │ └── TransitionData.kt
│ │ ├── presentation
│ │ ├── Container.kt
│ │ ├── SavableContainer.kt
│ │ ├── SavableScene.kt
│ │ ├── Scene.kt
│ │ └── SceneKey.kt
│ │ └── state
│ │ ├── ContainerState.kt
│ │ ├── NavigatorState.kt
│ │ ├── SavedState.kt
│ │ └── SceneState.kt
│ └── test
│ └── java
│ └── com
│ └── nhaarman
│ └── acorn
│ └── presentation
│ ├── SceneKeyTest.kt
│ └── SceneTest.kt
├── dependencies.gradle
├── docs
├── .old
│ ├── Sending Data.md
│ ├── Testability.md
│ ├── _Sidebar.md
│ ├── background
│ │ ├── User Interfaces.md
│ │ ├── application_architecture.md
│ │ ├── application_flow.md
│ │ ├── art
│ │ │ ├── application_architecture
│ │ │ │ ├── diagram.png
│ │ │ │ ├── diagram.xml
│ │ │ │ ├── diagram_large.png
│ │ │ │ └── diagram_large.xml
│ │ │ ├── application_flow
│ │ │ │ ├── navigators.png
│ │ │ │ ├── navigators.xml
│ │ │ │ └── state_machine.png
│ │ │ ├── displaying_screens
│ │ │ │ ├── activity_destroyed
│ │ │ │ │ ├── AA.xml
│ │ │ │ │ ├── AB.xml
│ │ │ │ │ ├── AC.xml
│ │ │ │ │ ├── BA.xml
│ │ │ │ │ ├── CA.xml
│ │ │ │ │ ├── DA.xml
│ │ │ │ │ ├── EA.xml
│ │ │ │ │ ├── EB.xml
│ │ │ │ │ ├── EC.xml
│ │ │ │ │ ├── FA.xml
│ │ │ │ │ ├── GA.xml
│ │ │ │ │ ├── HA.xml
│ │ │ │ │ ├── IA.xml
│ │ │ │ │ ├── JA.xml
│ │ │ │ │ ├── KA.xml
│ │ │ │ │ ├── activity_destroyed.gif
│ │ │ │ │ └── convert.sh
│ │ │ │ ├── activity_stopped
│ │ │ │ │ ├── AA.xml
│ │ │ │ │ ├── AB.xml
│ │ │ │ │ ├── AC.xml
│ │ │ │ │ ├── BA.xml
│ │ │ │ │ ├── CA.xml
│ │ │ │ │ ├── DA.xml
│ │ │ │ │ ├── DB.xml
│ │ │ │ │ ├── DC.xml
│ │ │ │ │ ├── EA.xml
│ │ │ │ │ ├── FA.xml
│ │ │ │ │ ├── GA.xml
│ │ │ │ │ ├── HA.xml
│ │ │ │ │ ├── activity_stopped.gif
│ │ │ │ │ └── convert.sh
│ │ │ │ ├── configuration_changed
│ │ │ │ │ ├── AA.xml
│ │ │ │ │ ├── AB.xml
│ │ │ │ │ ├── AC.xml
│ │ │ │ │ ├── BA.xml
│ │ │ │ │ ├── CA.xml
│ │ │ │ │ ├── DA.xml
│ │ │ │ │ ├── EA.xml
│ │ │ │ │ ├── FA.xml
│ │ │ │ │ ├── GA.xml
│ │ │ │ │ ├── HA.xml
│ │ │ │ │ ├── IA.xml
│ │ │ │ │ ├── JA.xml
│ │ │ │ │ ├── KA.xml
│ │ │ │ │ ├── KB.xml
│ │ │ │ │ ├── KC.xml
│ │ │ │ │ ├── LA.xml
│ │ │ │ │ ├── MA.xml
│ │ │ │ │ ├── NA.xml
│ │ │ │ │ ├── OA.xml
│ │ │ │ │ ├── PA.xml
│ │ │ │ │ ├── QA.xml
│ │ │ │ │ ├── RA.xml
│ │ │ │ │ ├── SA.xml
│ │ │ │ │ ├── configuration_changed.gif
│ │ │ │ │ └── convert.sh
│ │ │ │ ├── new_activity
│ │ │ │ │ ├── AA.xml
│ │ │ │ │ ├── AB.xml
│ │ │ │ │ ├── AC.xml
│ │ │ │ │ ├── BA.xml
│ │ │ │ │ ├── CA.xml
│ │ │ │ │ ├── DA.xml
│ │ │ │ │ ├── EA.xml
│ │ │ │ │ ├── FA.xml
│ │ │ │ │ ├── FB.xml
│ │ │ │ │ ├── FC.xml
│ │ │ │ │ ├── convert.sh
│ │ │ │ │ └── new_activity.gif
│ │ │ │ └── new_screen
│ │ │ │ │ ├── AA.xml
│ │ │ │ │ ├── AB.xml
│ │ │ │ │ ├── AC.xml
│ │ │ │ │ ├── BA.xml
│ │ │ │ │ ├── CA.xml
│ │ │ │ │ ├── DA.xml
│ │ │ │ │ ├── EA.xml
│ │ │ │ │ ├── EB.xml
│ │ │ │ │ ├── FA.xml
│ │ │ │ │ ├── GA.xml
│ │ │ │ │ ├── GB.xml
│ │ │ │ │ ├── GC.xml
│ │ │ │ │ ├── HA.xml
│ │ │ │ │ ├── IA.xml
│ │ │ │ │ ├── JA.xml
│ │ │ │ │ ├── KA.xml
│ │ │ │ │ ├── LA.xml
│ │ │ │ │ ├── MA.xml
│ │ │ │ │ ├── NA.xml
│ │ │ │ │ ├── NB.xml
│ │ │ │ │ ├── NC.xml
│ │ │ │ │ ├── convert.sh
│ │ │ │ │ └── new_screen.gif
│ │ │ ├── gifs
│ │ │ │ ├── AA.xml
│ │ │ │ ├── AA2.xml
│ │ │ │ ├── AA3.xml
│ │ │ │ ├── BB.xml
│ │ │ │ ├── BC.xml
│ │ │ │ ├── CC.xml
│ │ │ │ ├── CD.xml
│ │ │ │ ├── DD.xml
│ │ │ │ ├── DE.xml
│ │ │ │ ├── DF.xml
│ │ │ │ ├── EE.xml
│ │ │ │ ├── FF.xml
│ │ │ │ ├── FG.xml
│ │ │ │ ├── FH.xml
│ │ │ │ ├── GG.xml
│ │ │ │ ├── GH.xml
│ │ │ │ ├── GI.xml
│ │ │ │ ├── HA.xml
│ │ │ │ ├── HB.xml
│ │ │ │ ├── HC.xml
│ │ │ │ ├── IA.xml
│ │ │ │ ├── JA.xml
│ │ │ │ ├── JA2.xml
│ │ │ │ ├── JA3.xml
│ │ │ │ ├── KA.xml
│ │ │ │ ├── LA.xml
│ │ │ │ ├── MA.xml
│ │ │ │ ├── NA.xml
│ │ │ │ ├── OA.xml
│ │ │ │ ├── OA2.xml
│ │ │ │ ├── OA3.xml
│ │ │ │ ├── PA.xml
│ │ │ │ ├── QA.xml
│ │ │ │ ├── QB.xml
│ │ │ │ ├── QC.xml
│ │ │ │ ├── QD.xml
│ │ │ │ ├── RA.xml
│ │ │ │ ├── RB.xml
│ │ │ │ ├── RC.xml
│ │ │ │ ├── RC2.xml
│ │ │ │ ├── RC3.xml
│ │ │ │ ├── SA.xml
│ │ │ │ ├── convert.sh
│ │ │ │ └── scene_ui.gif
│ │ │ └── mobile_applications
│ │ │ │ ├── activity_lifecycle.png
│ │ │ │ ├── messaging.png
│ │ │ │ └── state_losing.gif
│ │ ├── deep_linking.md
│ │ ├── index.md
│ │ ├── mobile_applications.md
│ │ ├── saving_and_restoring_state.md
│ │ └── transition_animations.md
│ ├── concepts
│ │ ├── index.md
│ │ ├── navigators
│ │ │ ├── art
│ │ │ │ └── navigation_tree
│ │ │ │ │ ├── AA.xml
│ │ │ │ │ ├── BA.xml
│ │ │ │ │ ├── CA.xml
│ │ │ │ │ ├── DA.xml
│ │ │ │ │ ├── EA.xml
│ │ │ │ │ ├── FA.xml
│ │ │ │ │ ├── GA.xml
│ │ │ │ │ ├── HA.xml
│ │ │ │ │ ├── HB.xml
│ │ │ │ │ ├── convert.sh
│ │ │ │ │ └── navigation_tree.gif
│ │ │ ├── index.md
│ │ │ └── scene_management.md
│ │ ├── scenes
│ │ │ ├── art
│ │ │ │ ├── scene_lifecycle.png
│ │ │ │ └── scene_lifecycle.xml
│ │ │ └── index.md
│ │ └── view_layer
│ │ │ ├── index.md
│ │ │ └── the_activity_lifecycle_and_scene_transitions.md
│ ├── index.md
│ └── usage
│ │ ├── activity_controller_factories.md
│ │ ├── getting_started.md
│ │ ├── index.md
│ │ ├── navigators.md
│ │ ├── scenes.md
│ │ ├── setup.md
│ │ ├── transition_animations.md
│ │ ├── viewcontrollerfactories.md
│ │ └── viewcontrollers.md
├── build.gradle
├── readme.md
└── src
│ └── orchid
│ └── resources
│ ├── assets
│ ├── css
│ │ ├── orchidKotlindoc.scss
│ │ ├── pygments.scss
│ │ └── site.scss
│ └── media
│ │ ├── scene_lifecycle.png
│ │ └── scene_lifecycle.xml
│ ├── config.yml
│ ├── favicon.ico
│ ├── homepage.md
│ ├── media
│ ├── acorn_diagram.svg
│ ├── acorn_diagram.xml
│ ├── acorn_diagram_extended.svg
│ ├── acorn_diagram_extended.xml
│ ├── class_diagram.png
│ └── class_diagram.xml
│ └── wiki
│ ├── about.md
│ ├── activity
│ ├── about.md
│ ├── concepts.md
│ ├── media
│ │ ├── acorn_diagram_userinterface.drawio
│ │ ├── acorn_diagram_userinterface.svg
│ │ └── new_activity
│ │ │ ├── AA.xml
│ │ │ ├── AB.xml
│ │ │ ├── AC.xml
│ │ │ ├── BA.xml
│ │ │ ├── CA.xml
│ │ │ ├── DA.xml
│ │ │ ├── EA.xml
│ │ │ ├── FA.xml
│ │ │ ├── FB.xml
│ │ │ ├── FC.xml
│ │ │ ├── convert.sh
│ │ │ └── new_activity.gif
│ └── navigator_providing.md
│ ├── displaying_scenes
│ ├── about.md
│ ├── mapping_scenes_layouts.md
│ ├── media
│ │ ├── acorn_diagram_viewcontroller.drawio
│ │ └── acorn_diagram_viewcontroller.svg
│ ├── transition_animations.md
│ └── viewcontroller.md
│ ├── experimental.md
│ ├── experimental
│ ├── concurrentpairnavigator.md
│ └── media
│ │ ├── overlay_example.gif
│ │ └── scene_lifecycle.png
│ ├── getting_started.md
│ ├── navigators.md
│ ├── navigators
│ ├── about.md
│ ├── advanced
│ │ └── scene_management.md
│ ├── base_implementations.md
│ ├── composing_implementations.md
│ ├── interface.md
│ ├── media
│ │ ├── acorn_diagram_navigator.drawio
│ │ ├── acorn_diagram_navigator.svg
│ │ ├── acorn_diagram_navigator_interface.drawio
│ │ └── acorn_diagram_navigator_interface.svg
│ └── state_saving.md
│ ├── scenes.md
│ ├── scenes
│ ├── about.md
│ ├── base_implementations.md
│ ├── events.md
│ ├── interface.md
│ ├── lifecycle.md
│ ├── media
│ │ ├── acorn_diagram_scene.drawio
│ │ ├── acorn_diagram_scene.svg
│ │ ├── acorn_diagram_scene_interface.drawio
│ │ ├── acorn_diagram_scene_interface.svg
│ │ ├── scene_events.drawio
│ │ └── scene_events.svg
│ └── state_saving.md
│ ├── setup.md
│ └── summary.md
├── ext
├── acorn-android
│ ├── acorn-android-appcompat
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── android
│ │ │ └── AcornAppCompatActivity.kt
│ ├── acorn-android-lifecycle
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src
│ │ │ ├── androidTest
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── nhaarman
│ │ │ │ └── acorn
│ │ │ │ └── presentation
│ │ │ │ └── LifecycleSceneTest.kt
│ │ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── presentation
│ │ │ └── LifecycleScene.kt
│ ├── acorn-android-lint
│ │ ├── build.gradle
│ │ └── src
│ │ │ ├── main
│ │ │ └── java
│ │ │ │ └── com
│ │ │ │ └── nhaarman
│ │ │ │ └── acorn
│ │ │ │ └── lint
│ │ │ │ ├── AcornIssueRegistry.kt
│ │ │ │ └── RxSceneDisposablesUsageDetector.kt
│ │ │ └── test
│ │ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── lint
│ │ │ └── RxSceneDisposablesUsageDetectorTest.kt
│ ├── acorn-android-statechecks
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── readme.md
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── android
│ │ │ └── experimental
│ │ │ └── statechecks
│ │ │ ├── ExperimentalStateChecker.kt
│ │ │ ├── NavigatorEventsAdapter.kt
│ │ │ ├── StateChecker.kt
│ │ │ ├── StateCheckerHook.kt
│ │ │ ├── StateChecksInitProvider.kt
│ │ │ ├── StateRestorationFailedException.kt
│ │ │ └── StateSavingFailedException.kt
│ ├── acorn-android-testing
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src
│ │ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── android
│ │ │ └── tests
│ │ │ ├── AcornTestActivity.kt
│ │ │ └── AcornViewTestRule.kt
│ ├── acorn-android-timber
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ └── src
│ │ │ └── main
│ │ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── android
│ │ │ └── TimberLogger.kt
│ ├── build.gradle
│ ├── gradle.properties
│ └── src
│ │ ├── androidTest
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── nhaarman
│ │ │ │ └── acorn
│ │ │ │ └── android
│ │ │ │ ├── LinearLayoutContainer.kt
│ │ │ │ ├── TestActivity.kt
│ │ │ │ ├── internal
│ │ │ │ └── ViewApplyWindowBackgroundTest.kt
│ │ │ │ ├── presentation
│ │ │ │ └── InflatingViewControllerFactoryTest.kt
│ │ │ │ └── util
│ │ │ │ └── BundleTest.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ └── ic_android_black_24dp.xml
│ │ │ ├── layout
│ │ │ ├── linearlayout.xml
│ │ │ └── linearlayoutcontainer.xml
│ │ │ └── values
│ │ │ └── styles_transitiontest.xml
│ │ ├── main
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── nhaarman
│ │ │ │ └── acorn
│ │ │ │ └── android
│ │ │ │ ├── AcornActivity.kt
│ │ │ │ ├── AcornActivityDelegate.kt
│ │ │ │ ├── AndroidLogger.kt
│ │ │ │ ├── dispatching
│ │ │ │ ├── AcornSceneDispatcher.kt
│ │ │ │ ├── SceneDispatcher.kt
│ │ │ │ ├── SceneDispatcherFactory.kt
│ │ │ │ └── internal
│ │ │ │ │ ├── ActivityHandler.kt
│ │ │ │ │ └── DefaultActivityHandler.kt
│ │ │ │ ├── experimental
│ │ │ │ ├── AcornEvents.kt
│ │ │ │ ├── ExperimentalAcornEvents.kt
│ │ │ │ └── HookingSceneDispatcher.kt
│ │ │ │ ├── internal
│ │ │ │ ├── Logging.kt
│ │ │ │ └── ViewUtils.kt
│ │ │ │ ├── navigation
│ │ │ │ ├── AbstractNavigatorProvider.kt
│ │ │ │ └── NavigatorProvider.kt
│ │ │ │ ├── presentation
│ │ │ │ ├── ActivityController.kt
│ │ │ │ ├── ActivityControllerFactory.kt
│ │ │ │ ├── ComposingViewControllerFactory.kt
│ │ │ │ ├── RestorableViewController.kt
│ │ │ │ ├── ViewControllerFactory.kt
│ │ │ │ ├── ViewControllerFactoryDSL.kt
│ │ │ │ ├── ViewProvidingScene.kt
│ │ │ │ └── internal
│ │ │ │ │ ├── BindingViewControllerFactory.kt
│ │ │ │ │ └── InflatingViewControllerFactory.kt
│ │ │ │ ├── transition
│ │ │ │ ├── ComposingSceneTransitionFactory.kt
│ │ │ │ ├── DefaultSceneTransitionFactory.kt
│ │ │ │ ├── DoBeforeTransition.kt
│ │ │ │ ├── FadeInFromBottomTransition.kt
│ │ │ │ ├── FadeOutToBottomTransition.kt
│ │ │ │ ├── HideKeyboard.kt
│ │ │ │ ├── NoopSceneTransitionFactory.kt
│ │ │ │ ├── SceneTransitionFactory.kt
│ │ │ │ ├── TransitionFactoryDSL.kt
│ │ │ │ └── internal
│ │ │ │ │ ├── BindingSceneTransitionFactory.kt
│ │ │ │ │ ├── TransitionBinding.kt
│ │ │ │ │ ├── TransitionCreationFailure.kt
│ │ │ │ │ └── View.kt
│ │ │ │ ├── uistate
│ │ │ │ ├── UIHandler.kt
│ │ │ │ ├── UIState.kt
│ │ │ │ ├── UIStateUIHandler.kt
│ │ │ │ └── internal
│ │ │ │ │ └── Destination.kt
│ │ │ │ └── util
│ │ │ │ ├── Bundle.kt
│ │ │ │ ├── LayoutInflater.kt
│ │ │ │ └── View.kt
│ │ └── res
│ │ │ └── values
│ │ │ └── dimens.xml
│ │ └── test
│ │ ├── java
│ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ ├── android
│ │ │ ├── dispatching
│ │ │ │ ├── AcornSceneDispatcherTest.kt
│ │ │ │ └── internal
│ │ │ │ │ └── DefaultActivityHandlerTest.kt
│ │ │ ├── navigation
│ │ │ │ └── AbstractNavigatorProviderTest.kt
│ │ │ ├── presentation
│ │ │ │ └── BindingViewControllerFactoryTest.kt
│ │ │ ├── transition
│ │ │ │ ├── ComposingSceneTransitionFactoryTest.kt
│ │ │ │ └── internal
│ │ │ │ │ └── BindingSceneTransitionFactoryTest.kt
│ │ │ ├── uistate
│ │ │ │ ├── NotVisibleTest.kt
│ │ │ │ ├── NotVisibleWithDestinationTest.kt
│ │ │ │ ├── VisibleTest.kt
│ │ │ │ └── VisibleWithDestinationTest.kt
│ │ │ └── util
│ │ │ │ ├── RootViewGroup.kt
│ │ │ │ ├── TestScene.kt
│ │ │ │ ├── TestSceneTransitionFactory.kt
│ │ │ │ ├── TestTransition.kt
│ │ │ │ ├── TestView.kt
│ │ │ │ ├── TestViewController.kt
│ │ │ │ └── TestViewControllerFactory.kt
│ │ │ └── navigation
│ │ │ └── TestNavigator.kt
│ │ └── resources
│ │ └── mockito-extensions
│ │ └── org.mockito.plugins.MockMaker
└── acorn
│ ├── acorn-experimental
│ ├── build.gradle
│ ├── gradle.properties
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── navigation
│ │ │ └── experimental
│ │ │ ├── CombinedContainer.kt
│ │ │ ├── CombinedScene.kt
│ │ │ ├── CompositeParallelNavigator.kt
│ │ │ ├── ConcurrentPairNavigator.kt
│ │ │ ├── ExperimentalCompositeParallelNavigator.kt
│ │ │ ├── ExperimentalConcurrentPairNavigator.kt
│ │ │ └── internal
│ │ │ └── Logging.kt
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── navigation
│ │ └── experimental
│ │ ├── CompositeParallelNavigatorTest.kt
│ │ ├── ConcurrentPairNavigatorTest.kt
│ │ └── SavableTestScene.kt
│ ├── acorn-rx
│ ├── build.gradle
│ ├── gradle.properties
│ └── src
│ │ ├── main
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ ├── Option.kt
│ │ │ ├── navigation
│ │ │ └── DisposableHandle.kt
│ │ │ └── presentation
│ │ │ └── RxScene.kt
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ ├── navigation
│ │ └── DisposableHandleTest.kt
│ │ └── presentation
│ │ └── RxSceneTest.kt
│ ├── acorn-testing
│ ├── build.gradle
│ ├── gradle.properties
│ └── src
│ │ └── main
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── testing
│ │ ├── ContainerProvider.kt
│ │ ├── RestorableTestContainer.kt
│ │ ├── TestContext.kt
│ │ └── TestLogger.kt
│ ├── build.gradle
│ ├── gradle.properties
│ ├── integrationtests
│ ├── build.gradle
│ └── src
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── integrationtests
│ │ ├── ReplacingNavigator tests for scenes that cause a transition in their onStart().kt
│ │ └── StackNavigator tests for scenes that cause a transition in their onStart().kt
│ └── src
│ ├── main
│ └── java
│ │ ├── acorn
│ │ └── Log.kt
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ ├── Logger.kt
│ │ ├── OnBackPressListener.kt
│ │ ├── internal
│ │ └── Logging.kt
│ │ ├── navigation
│ │ ├── CompositeReplacingNavigator.kt
│ │ ├── CompositeStackNavigator.kt
│ │ ├── ReplacingNavigator.kt
│ │ ├── SingleSceneNavigator.kt
│ │ ├── StackNavigator.kt
│ │ └── WizardNavigator.kt
│ │ ├── presentation
│ │ └── BasicScene.kt
│ │ ├── state
│ │ ├── ContainerState.kt
│ │ ├── NavigatorState.kt
│ │ ├── SavedState.kt
│ │ ├── SceneState.kt
│ │ └── internal
│ │ │ └── BaseSavedState.kt
│ │ └── util
│ │ └── LazyVar.kt
│ └── test
│ ├── java
│ ├── acorn
│ │ └── LogKtTest.kt
│ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ ├── TestLoggerExtension.kt
│ │ ├── navigation
│ │ ├── CompositeReplacingNavigatorTest.kt
│ │ ├── CompositeStackNavigatorTest.kt
│ │ ├── ReplacingNavigatorTest.kt
│ │ ├── SavableTestScene.kt
│ │ ├── SingleSceneNavigatorTest.kt
│ │ ├── StackNavigatorTest.kt
│ │ ├── TestScene.kt
│ │ └── WizardNavigatorTest.kt
│ │ ├── presentation
│ │ └── BasicSceneTest.kt
│ │ └── state
│ │ ├── SavedStateGetTest.kt
│ │ └── internal
│ │ └── BaseSavedStateTest.kt
│ └── resources
│ └── META-INF
│ └── services
│ └── org.junit.jupiter.api.extension.Extension
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── ktlint
├── releasing.md
├── samples
├── hello-bottombar
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── hellobottombar
│ │ │ ├── DestinationSelectedListener.kt
│ │ │ ├── HelloBottomBarNavigator.kt
│ │ │ ├── HelloBottomBarNavigatorProvider.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── MainLayout.kt
│ │ │ ├── MyApplication.kt
│ │ │ ├── MyDestination.kt
│ │ │ ├── MySceneTransitionFactory.kt
│ │ │ ├── MyViewControllerFactory.kt
│ │ │ ├── favorites
│ │ │ ├── FavoritesContainer.kt
│ │ │ ├── FavoritesNavigator.kt
│ │ │ ├── FavoritesScene.kt
│ │ │ └── FavoritesViewControllerFactory.kt
│ │ │ ├── music
│ │ │ ├── MusicContainer.kt
│ │ │ ├── MusicNavigator.kt
│ │ │ ├── MusicScene.kt
│ │ │ └── MusicViewControllerFactory.kt
│ │ │ ├── news
│ │ │ ├── NewsContainer.kt
│ │ │ ├── NewsNavigator.kt
│ │ │ ├── NewsScene.kt
│ │ │ └── NewsViewControllerFactory.kt
│ │ │ ├── places
│ │ │ ├── PlacesContainer.kt
│ │ │ ├── PlacesNavigator.kt
│ │ │ ├── PlacesScene.kt
│ │ │ └── PlacesViewControllerFactory.kt
│ │ │ └── util
│ │ │ └── BottomNavigationView.kt
│ │ └── res
│ │ ├── color
│ │ └── menu_foreground.xml
│ │ ├── drawable
│ │ ├── ic_favorite_white_196dp.xml
│ │ ├── ic_music_white_196dp.xml
│ │ ├── ic_news_white_196dp.xml
│ │ └── ic_place_white_196p.xml
│ │ ├── layout
│ │ ├── favorites_scene.xml
│ │ ├── main_layout.xml
│ │ ├── music_scene.xml
│ │ ├── news_scene.xml
│ │ └── places_scene.xml
│ │ ├── menu
│ │ └── menu.xml
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── hello-concurrentpairnavigator
│ ├── build.gradle
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── helloconcurrentpairnavigator
│ │ │ └── HelloConcurrentPairNavigatorTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── nhaarman
│ │ │ │ └── acorn
│ │ │ │ └── samples
│ │ │ │ └── helloconcurrentpairnavigator
│ │ │ │ ├── FirstScene.kt
│ │ │ │ ├── FirstSecondTransition.kt
│ │ │ │ ├── FirstSecondViewController.kt
│ │ │ │ ├── HelloConcurrentPairNavigator.kt
│ │ │ │ ├── HelloConcurrentPairNavigatorProvider.kt
│ │ │ │ ├── HelloConcurrentPairNavigatorViewControllerFactory.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── MyApplication.kt
│ │ │ │ ├── SecondFirstTransition.kt
│ │ │ │ └── SecondScene.kt
│ │ └── res
│ │ │ ├── layout
│ │ │ ├── first_and_second_scene.xml
│ │ │ ├── first_scene.xml
│ │ │ └── second_scene.xml
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── samples
│ │ └── helloconcurrentpairnavigator
│ │ └── FirstSceneTest.kt
├── hello-navigation
│ ├── build.gradle
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── hellonavigation
│ │ │ └── HelloNavigationTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── nhaarman
│ │ │ │ └── acorn
│ │ │ │ └── samples
│ │ │ │ └── hellonavigation
│ │ │ │ ├── FirstScene.kt
│ │ │ │ ├── HelloNavigationNavigator.kt
│ │ │ │ ├── HelloNavigationNavigatorProvider.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── MyApplication.kt
│ │ │ │ └── SecondScene.kt
│ │ └── res
│ │ │ ├── layout
│ │ │ ├── first_scene.xml
│ │ │ └── second_scene.xml
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── samples
│ │ └── helloworld
│ │ └── FirstSceneTest.kt
├── hello-overridingback
│ ├── build.gradle
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── hellooverridingback
│ │ │ └── HelloOverridingBackTest.kt
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── hellooverridingback
│ │ │ ├── FirstScene.kt
│ │ │ ├── HelloOverridingBackNavigator.kt
│ │ │ ├── HelloOverridingBackNavigatorProvider.kt
│ │ │ ├── MainActivity.kt
│ │ │ └── MyApplication.kt
│ │ └── res
│ │ ├── layout
│ │ └── first_scene.xml
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
├── hello-sharedata
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── hellosharedata
│ │ │ ├── MainActivity.kt
│ │ │ ├── MyApplication.kt
│ │ │ ├── PickPictureActivity.kt
│ │ │ ├── pictures
│ │ │ ├── Picture.kt
│ │ │ ├── PictureContentProvider.kt
│ │ │ └── PicturesProvider.kt
│ │ │ └── presentation
│ │ │ ├── MainNavigator.kt
│ │ │ ├── MainNavigatorProvider.kt
│ │ │ ├── PickPictureNavigator.kt
│ │ │ ├── PickPictureNavigatorProvider.kt
│ │ │ ├── ViewFactory.kt
│ │ │ ├── picturedetail
│ │ │ ├── PictureDetailContainer.kt
│ │ │ └── PictureDetailScene.kt
│ │ │ └── picturegallery
│ │ │ ├── PictureGalleryContainer.kt
│ │ │ ├── PictureGalleryRecyclerView.kt
│ │ │ └── PictureGalleryScene.kt
│ │ └── res
│ │ ├── drawable
│ │ └── ic_arrow_back_black_24dp.xml
│ │ ├── layout
│ │ ├── picturedetail_scene.xml
│ │ ├── picturegallery_picture.xml
│ │ └── picturegallery_scene.xml
│ │ ├── menu
│ │ └── pickpicture.xml
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
├── hello-startactivity
│ ├── build.gradle
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── hellostartactivity
│ │ │ └── AppTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── nhaarman
│ │ │ │ └── acorn
│ │ │ │ └── samples
│ │ │ │ └── hellostartactivity
│ │ │ │ ├── AppSettingsActivityController.kt
│ │ │ │ ├── AppSettingsScene.kt
│ │ │ │ ├── FirstScene.kt
│ │ │ │ ├── HelloStartActivityNavigator.kt
│ │ │ │ ├── HelloStartActivityNavigatorProvider.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ └── MyApplication.kt
│ │ └── res
│ │ │ ├── layout
│ │ │ └── first_scene.xml
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── samples
│ │ └── hellostartactivity
│ │ └── FirstSceneTest.kt
├── hello-staterestoration
│ ├── art
│ │ └── hello_staterestoration.png
│ ├── build.gradle
│ ├── readme.md
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── hellostaterestoration
│ │ │ └── HelloStateRestorationTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── nhaarman
│ │ │ │ └── acorn
│ │ │ │ └── samples
│ │ │ │ └── hellostaterestoration
│ │ │ │ ├── HelloStateRestorationContainer.kt
│ │ │ │ ├── HelloStateRestorationNavigator.kt
│ │ │ │ ├── HelloStateRestorationNavigatorProvider.kt
│ │ │ │ ├── HelloStateRestorationScene.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ └── MyApplication.kt
│ │ └── res
│ │ │ ├── layout
│ │ │ └── myscene.xml
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── samples
│ │ └── hellostaterestoration
│ │ └── HelloStateRestorationSceneTest.kt
├── hello-transitionanimation
│ ├── build.gradle
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── hellotransitionanimation
│ │ │ └── HelloTransitionAnimationTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── nhaarman
│ │ │ │ └── acorn
│ │ │ │ └── samples
│ │ │ │ └── hellotransitionanimation
│ │ │ │ ├── FirstScene.kt
│ │ │ │ ├── FirstToSecondTransition.kt
│ │ │ │ ├── HelloTransitionAnimationNavigator.kt
│ │ │ │ ├── HelloTransitionAnimationNavigatorProvider.kt
│ │ │ │ ├── MainActivity.kt
│ │ │ │ ├── MyApplication.kt
│ │ │ │ └── SecondScene.kt
│ │ └── res
│ │ │ ├── layout
│ │ │ ├── first_scene.xml
│ │ │ └── second_scene.xml
│ │ │ └── values
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── samples
│ │ └── hellotransitionanimation
│ │ └── FirstSceneTest.kt
├── hello-viewfactory
│ ├── build.gradle
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── hellostaterestoration
│ │ │ └── HelloViewFactoryTest.kt
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── helloviewfactory
│ │ │ ├── HelloViewFactoryContainer.kt
│ │ │ ├── HelloViewFactoryNavigator.kt
│ │ │ ├── HelloViewFactoryNavigatorProvider.kt
│ │ │ ├── HelloViewFactoryScene.kt
│ │ │ ├── MainActivity.kt
│ │ │ └── MyApplication.kt
│ │ └── res
│ │ ├── layout
│ │ └── myscene.xml
│ │ └── values
│ │ ├── strings.xml
│ │ └── styles.xml
├── hello-world
│ ├── art
│ │ └── hello_world.png
│ ├── build.gradle
│ ├── readme.md
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── samples
│ │ │ └── helloworld
│ │ │ └── HelloWorldTest.kt
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ │ └── com
│ │ │ │ └── nhaarman
│ │ │ │ └── acorn
│ │ │ │ └── samples
│ │ │ │ └── helloworld
│ │ │ │ ├── HelloWorldContainer.kt
│ │ │ │ ├── HelloWorldNavigator.kt
│ │ │ │ ├── HelloWorldNavigatorProvider.kt
│ │ │ │ ├── HelloWorldScene.kt
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── layout
│ │ │ └── hello_world.xml
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── test
│ │ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── samples
│ │ └── helloworld
│ │ └── HelloWorldSceneTest.kt
└── notes-app
│ ├── android
│ ├── build.gradle
│ └── src
│ │ ├── androidTest
│ │ └── java
│ │ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── notesapp
│ │ │ └── android
│ │ │ ├── AppTest.kt
│ │ │ ├── PurgeDatabaseRule.kt
│ │ │ └── ui
│ │ │ ├── createitem
│ │ │ └── CreateItemViewTest.kt
│ │ │ └── itemlist
│ │ │ └── ItemListViewTest.kt
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── nhaarman
│ │ │ └── acorn
│ │ │ └── notesapp
│ │ │ └── android
│ │ │ ├── AndroidNotesAppComponent.kt
│ │ │ ├── MainActivity.kt
│ │ │ ├── MemoryNoteItemsRepository.kt
│ │ │ ├── NotesAppNavigatorProvider.kt
│ │ │ ├── NotesApplication.kt
│ │ │ ├── TransitionFactoryProvider.kt
│ │ │ ├── ViewFactoryProvider.kt
│ │ │ ├── internal
│ │ │ └── Logging.kt
│ │ │ └── ui
│ │ │ ├── createitem
│ │ │ ├── CreateItemToolbar.kt
│ │ │ └── CreateItemViewController.kt
│ │ │ ├── edititem
│ │ │ ├── EditItemToolbar.kt
│ │ │ └── EditItemViewController.kt
│ │ │ ├── itemlist
│ │ │ ├── ItemListViewController.kt
│ │ │ ├── ItemView.kt
│ │ │ └── ItemsRecyclerView.kt
│ │ │ └── transition
│ │ │ ├── ClickedItemViewData.kt
│ │ │ ├── EditItemItemListTransition.kt
│ │ │ ├── ItemListCreateItemTransition.kt
│ │ │ └── ItemListEditItemTransition.kt
│ │ └── res
│ │ ├── drawable
│ │ ├── ic_add_white_24dp.xml
│ │ ├── ic_check_white_24dp.xml
│ │ ├── ic_delete_black_24dp.xml
│ │ └── ic_delete_white_24dp.xml
│ │ ├── layout
│ │ ├── createitem_scene.xml
│ │ ├── edititem_scene.xml
│ │ ├── itemlist_itemview.xml
│ │ ├── itemlist_scene.xml
│ │ └── itemlistcreateitem_reveal.xml
│ │ ├── menu
│ │ ├── createitem_menu.xml
│ │ └── edititem_menu.xml
│ │ └── values
│ │ ├── createitem_strings.xml
│ │ ├── edititem_strings.xml
│ │ ├── notesapp_colors.xml
│ │ ├── notesapp_strings.xml
│ │ └── notesapp_styles.xml
│ ├── build.gradle
│ └── src
│ ├── main
│ └── java
│ │ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── notesapp
│ │ ├── MainThread.kt
│ │ ├── NotesAppComponent.kt
│ │ ├── internal
│ │ └── Logging.kt
│ │ ├── navigation
│ │ ├── CreateItemNavigator.kt
│ │ ├── NotesAppNavigator.kt
│ │ └── PrimaryNavigator.kt
│ │ ├── note
│ │ ├── NoteItem.kt
│ │ └── NoteItemsRepository.kt
│ │ └── presentation
│ │ ├── createitem
│ │ ├── CreateItemContainer.kt
│ │ └── CreateItemScene.kt
│ │ ├── edititem
│ │ ├── EditItemContainer.kt
│ │ └── EditItemScene.kt
│ │ └── itemlist
│ │ ├── ItemListContainer.kt
│ │ └── ItemListScene.kt
│ └── test
│ ├── java
│ └── com
│ │ └── nhaarman
│ │ └── acorn
│ │ └── notesapp
│ │ ├── ImmediateMainThreadExtension.kt
│ │ ├── NoRxErrorsExtension.kt
│ │ ├── integration
│ │ ├── NotesAppTest.kt
│ │ ├── NotesAppTestContainerProvider.kt
│ │ ├── TestNotesAppComponent.kt
│ │ ├── createitem
│ │ │ ├── CreateItemRobot.kt
│ │ │ └── TestCreateItemContainer.kt
│ │ ├── edititem
│ │ │ ├── CreateItemRobot.kt
│ │ │ └── TestEditItemContainer.kt
│ │ └── itemlist
│ │ │ ├── ItemListRobot.kt
│ │ │ └── TestItemListContainer.kt
│ │ ├── note
│ │ └── MemoryNoteItemsRepository.kt
│ │ └── presentation
│ │ └── itemlist
│ │ └── ItemListSceneTest.kt
│ └── resources
│ └── META-INF
│ └── services
│ └── org.junit.jupiter.api.extension.Extension
├── settings.gradle
└── test
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.sh linguist-vendored
2 | test linguist-vendored
3 | gradlew linguist-vendored
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 |
5 | ---
6 |
7 | **Describe the bug**
8 | A clear and concise description of what the bug is.
9 |
10 | **To Reproduce**
11 | Steps to reproduce the behavior:
12 | 1. Go to '...'
13 | 2. Click on '....'
14 | 3. Scroll down to '....'
15 | 4. See error
16 |
17 | **Expected behavior**
18 | A clear and concise description of what you expected to happen.
19 |
20 | **Screenshots**
21 | If applicable, add screenshots to help explain your problem.
22 |
23 | **Environmental info (please complete the following information):**
24 | - Library version: [e.g. 1.0.0]
25 | - Device: [e.g. Oneplus 6T]
26 | - OS: [e.g. Android 9]
27 |
28 | ** Stack trace**
29 | ```
30 | Include the stack trace, if applicable.
31 | ```
32 |
33 | **Additional context**
34 | Add any other context about the problem here.
35 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 |
5 | ---
6 |
7 | **Is your feature request related to a problem? Please describe.**
8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9 |
10 | **Describe the solution you'd like**
11 | A clear and concise description of what you want to happen.
12 |
13 | **Describe alternatives you've considered**
14 | A clear and concise description of any alternative solutions or features you've considered.
15 |
16 | **Additional context**
17 | Add any other context or screenshots about the feature request here.
18 |
--------------------------------------------------------------------------------
/.github/art/diagram_readme.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/.github/art/diagram_readme.png
--------------------------------------------------------------------------------
/.github/workflows/pull_request.yml:
--------------------------------------------------------------------------------
1 | name: Pull request
2 | on:
3 | pull_request:
4 |
5 | concurrency:
6 | group: ${{ github.head_ref || github.ref }}
7 | cancel-in-progress: true
8 |
9 | jobs:
10 |
11 | build:
12 | runs-on: ubuntu-latest
13 |
14 | steps:
15 | - name: checkout
16 | uses: actions/checkout@v3
17 | with:
18 | fetch-depth: 0
19 | - uses: actions/setup-java@v3
20 | with:
21 | distribution: 'zulu'
22 | java-version: '17'
23 |
24 | - name: ktlint
25 | run: bash ./ktlint "**/src/**/*.kt" --color
26 |
27 | - name: Test
28 | run: |
29 | .github/workflows/test.sh
30 |
--------------------------------------------------------------------------------
/.github/workflows/test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ./ktlint
4 |
5 | ./gradlew clean \
6 | test \
7 | \
8 | :ext-acorn-android-testing:lint \
9 | :ext-acorn-android-timber:lint \
10 | :ext-acorn-android-lifecycle:lint \
11 | \
12 | :samples:hello-bottombar:lintRelease \
13 | :samples:hello-concurrentpairnavigator:lintRelease \
14 | :samples:hello-navigation:lintRelease \
15 | :samples:hello-overridingback:lintRelease \
16 | :samples:hello-sharedata:lintRelease \
17 | :samples:hello-startactivity:lintRelease \
18 | :samples:hello-staterestoration:lintRelease \
19 | :samples:hello-transitionanimation:lintRelease \
20 | :samples:hello-viewfactory:lintRelease \
21 | :samples:hello-world:lintRelease \
22 | \
23 | :samples:notes-app:android:lintRelease \
24 | \
25 | packageDebugAndroidTest \
26 | \
27 | publishToMavenLocal \
28 | --max-workers=1 --rerun-tasks -Dorg.gradle.jvmargs=-Xmx1536m
29 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | **/bin/*
2 | **/gen/*
3 | **/build/*
4 | **/out/*
5 | **/*.iml
6 | .gradle
7 | **/local.properties
8 | .DS_Store
9 | .metadata/*
10 | **.hprof
11 |
12 | **.log
13 |
14 | *.orig
15 | **/.attach*
16 |
17 | .idea/*
18 |
19 | !/.idea/codeStyles
20 | !/.idea/runConfigurations
21 | !/.idea/inspectionProfiles
22 | !/.idea/encodings.xml
23 | !/.idea/misc.xml
24 | !/.idea/vcs.xml
25 | !/.idea/dictionaries
26 | !/.idea/icon.png
27 | !/.idea/icon_dark.png
28 |
29 | .projectFilesBackup
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/dictionaries/nhaarman.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | composable
5 | connectable
6 | haarman
7 | lifecycles
8 | nhaarman
9 | niek
10 | notesapp
11 | onboarding
12 | restorable
13 | saveable
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/.idea/icon.png
--------------------------------------------------------------------------------
/.idea/icon_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/.idea/icon_dark.png
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/ktlint.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/acorn_tests.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/ext_acorn_tests.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.ops/publishing-android.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "maven-publish"
2 |
3 | apply from: "$rootDir/.ops/publishing-base.gradle"
4 |
5 | //task sourcesJar(type: Jar) {
6 | // archiveClassifier.set('sources')
7 | // from android.sourceSets.main.java.srcDirs
8 | //}
9 |
10 | afterEvaluate {
11 | publishing {
12 | publications {
13 | maven(MavenPublication) {
14 | from components.release
15 |
16 | // artifact sourcesJar
17 | }
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/.ops/publishing-kotlin.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: "maven-publish"
2 |
3 | apply from: "$rootDir/.ops/publishing-base.gradle"
4 |
5 | java {
6 | withJavadocJar()
7 | withSourcesJar()
8 | }
9 |
10 | publishing {
11 | publications {
12 | maven(MavenPublication) {
13 | from(components.java)
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/.ops/testing.gradle:
--------------------------------------------------------------------------------
1 | def hasAndroid = plugins.hasPlugin("com.android.library") || plugins.hasPlugin("com.android.application")
2 |
3 | if (!hasAndroid) {
4 | test {
5 | useJUnitPlatform {
6 | systemProperties = ['junit.jupiter.extensions.autodetection.enabled': 'true']
7 | }
8 | }
9 | } else {
10 | project.apply plugin: "de.mannodermaus.android-junit5"
11 | junitPlatform {
12 | configurationParameter "junit.jupiter.extensions.autodetection.enabled", "true"
13 | }
14 | }
15 |
16 | project.apply plugin: "com.adarshr.test-logger"
17 | testlogger {
18 | theme = "mocha"
19 | }
--------------------------------------------------------------------------------
/core/acorn-android-core/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.android.library")
3 | id("kotlin-android")
4 |
5 | id("digital.wup.android-maven-publish")
6 | id("signing")
7 | }
8 |
9 | java {
10 | sourceCompatibility = JavaVersion.VERSION_17
11 | targetCompatibility = JavaVersion.VERSION_17
12 | }
13 |
14 | android {
15 | kotlinOptions {
16 | jvmTarget = "17"
17 | }
18 |
19 | compileOptions {
20 | sourceCompatibility JavaVersion.VERSION_17
21 | targetCompatibility JavaVersion.VERSION_17
22 | }
23 | }
24 |
25 | android {
26 | defaultConfig {
27 | minSdkVersion(21)
28 | }
29 |
30 | namespace "com.nhaarman.acorn.core.android"
31 | }
32 |
33 | dependencies {
34 | api project(":acorn")
35 | }
--------------------------------------------------------------------------------
/core/acorn-android-core/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn
2 | artifactId=acorn-android
--------------------------------------------------------------------------------
/core/acorn-core/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.jetbrains.kotlin.jvm")
3 |
4 | id("org.gradle.maven-publish")
5 | id("signing")
6 | }
7 |
8 | java {
9 | sourceCompatibility = JavaVersion.VERSION_17
10 | targetCompatibility = JavaVersion.VERSION_17
11 | }
12 |
13 | compileKotlin {
14 | kotlinOptions {
15 | jvmTarget = "17"
16 | }
17 | }
18 |
19 | dependencies {
20 | compileOnly "androidx.annotation:annotation"
21 |
22 | testImplementation "org.mockito.kotlin:mockito-kotlin"
23 | testImplementation "com.nhaarman:expect.kt"
24 | testImplementation "org.junit.jupiter:junit-jupiter-api"
25 | testImplementation "org.junit.jupiter:junit-jupiter-engine"
26 | }
--------------------------------------------------------------------------------
/core/acorn-core/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn
2 | artifactId=acorn
--------------------------------------------------------------------------------
/core/acorn-core/src/main/java/com/nhaarman/acorn/navigation/SavableNavigator.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.navigation
18 |
19 | import com.nhaarman.acorn.state.NavigatorState
20 |
21 | /**
22 | * Indicates that implementers can have their instance state saved.
23 | */
24 | interface SavableNavigator : Navigator {
25 |
26 | /** Save instance state. */
27 | fun saveInstanceState(): NavigatorState
28 | }
29 |
--------------------------------------------------------------------------------
/core/acorn-core/src/main/java/com/nhaarman/acorn/presentation/Container.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.presentation
18 |
19 | /**
20 | * An upper bound for [Scene] parameter types.
21 | */
22 | interface Container
23 |
--------------------------------------------------------------------------------
/core/acorn-core/src/main/java/com/nhaarman/acorn/presentation/SavableScene.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.presentation
18 |
19 | import com.nhaarman.acorn.state.SceneState
20 |
21 | /**
22 | * Indicates that implementers can have their instance state saved.
23 | */
24 | interface SavableScene {
25 |
26 | /**
27 | * Save instance state.
28 | */
29 | fun saveInstanceState(): SceneState
30 | }
31 |
--------------------------------------------------------------------------------
/core/acorn-core/src/main/java/com/nhaarman/acorn/state/ContainerState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.state
18 |
19 | interface ContainerState : SavedState
20 |
--------------------------------------------------------------------------------
/core/acorn-core/src/main/java/com/nhaarman/acorn/state/NavigatorState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.state
18 |
19 | interface NavigatorState : SavedState {
20 |
21 | operator fun set(key: String, value: SceneState?)
22 |
23 | operator fun set(key: String, value: NavigatorState?)
24 | }
25 |
--------------------------------------------------------------------------------
/core/acorn-core/src/main/java/com/nhaarman/acorn/state/SceneState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.state
18 |
19 | interface SceneState : SavedState {
20 |
21 | operator fun set(key: String, value: ContainerState?)
22 | }
23 |
--------------------------------------------------------------------------------
/docs/.old/Testability.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/Testability.md
--------------------------------------------------------------------------------
/docs/.old/_Sidebar.md:
--------------------------------------------------------------------------------
1 | * [[Home]]
2 | * [[Motivation]]
3 | * [[Application Architecture]]
4 | * [[Application Flow]]
5 | * [[Saving and restoring state]]
6 | * [[Deep Linking]]
7 | * [[Scenes]]
8 | * [[Navigation]]
9 | * [[Scene Management]]
10 | * [[Restoring Navigator State]]
11 | * [[Navigator Results]]
12 | * [[Composing Navigators]]
13 | * [[Sending Data]]
14 | * [[Back Presses]]
15 | * [[User Interfaces]]
16 | * [[Displaying Scenes]]
17 | * [[View Factories]]
18 | * [[The Activity lifecycle and Scene transitions]]
19 | * [[Transition animations]]
20 |
--------------------------------------------------------------------------------
/docs/.old/background/User Interfaces.md:
--------------------------------------------------------------------------------
1 | In Android, the Activity is the 'window' between the application and the user by
2 | hosting the user interface and intercepting input events.
3 | The user interface is typically implemented using View instances, which are
4 | attached to the Activity.
5 | Views can be instantiated manually, or inflated from an xml resource, after
6 | which it can be attached to the Activity.
7 |
8 | ## The Activity as the UI layer
9 |
10 | Multitasking in Android means that you can switch quickly between different
11 | applications.
12 |
13 | During the life of an Activity, it goes through several phases.
14 | Most interestingly, when the Activity is in its 'started' or 'resumed' state,
15 | one can assume the Activity is at least visible to the user.
16 | Activities can enter their 'started' or 'stopped' state any number of times,
17 | until it is destroyed by the system.
18 |
19 |
20 |
21 | Once an Activity instance is destroyed, a new instance can be recreated and
22 | restored to the previous state.
23 | This typically happens on configuration changes, such as device rotation.
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/docs/.old/background/art/application_architecture/diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/application_architecture/diagram.png
--------------------------------------------------------------------------------
/docs/.old/background/art/application_architecture/diagram_large.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/application_architecture/diagram_large.png
--------------------------------------------------------------------------------
/docs/.old/background/art/application_flow/navigators.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/application_flow/navigators.png
--------------------------------------------------------------------------------
/docs/.old/background/art/application_flow/state_machine.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/application_flow/state_machine.png
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/activity_destroyed/EA.xml:
--------------------------------------------------------------------------------
1 | tVVdk5owFP01PNrBZKH4qLjdnXZqnXEc18dIrpDZQGyIAv76Bglfyn5Ma8cHc09ubpJzTi4W9uP8SZJD9FNQ4BayaW7huYXQGDsT/VciRYV4GFVAKBk1SS2wYmcwoG3QI6OQ9hKVEFyxQx8MRJJAoHoYkVJk/bS94P1dDyQ0O9otsAoIh5u0DaMqMrdwOtnPwMKo3nlsm5mY1MkGSCNCRdaB8KOFfSmEqkZx7gMvyat5qdZ9e2O2OZiERH1mAfELXrw4y3zt7k770Tadrd2RqXIi/GgubA6ripoBKY4JhbKIbeFZFjEFqwMJytlMa66xSMVcR2M93DPOfcGF1HEiEp00uz1nvSlIBXkHMud+AhGDkoVOqWdrDo2JHkyYtYrgOiXqqNGAxLggbEq3ROmB4WqYtwKlwf739022mE62dL3Z/DgvR+4NbwtyYiFR+ub/ROA92HL7bA3R5Q2w5f4vsryPTQYJnZavVUcBJ2nKgj4tkDP1UjL45atjwq0htBzP825QmICSNLrwPjbBkigFMrkgyNYUzlIlxSvUjrUQnvjl7z0hUnGUAXzsDaAhvCtXRw5nQI4ak8CJYqd+PxrSyOywFEyfuHEDxn03YPtK5uo+ZlW3f1wVQlePEF0XUkSGoG4KXSzTXPtTLjrn+cJd4enE3s1f42fv1zhHA61qZSGXa7ZmO/3o3FA1qt2je2kvUAc8+jDkEg/tsOve57miK4GaT1/HH0PN7S96mw7b702lS/vVxo9/AA==
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/activity_destroyed/EB.xml:
--------------------------------------------------------------------------------
1 | tVVdk5owFP01PNrBZKH4qLjdnXZqnXEc18dIrpDZQGyIAv76Bglfyn5Ma8cHc09ubpJzTi4W9uP8SZJD9FNQ4BayaW7huYXQGDsT/VciRYV4GFVAKBk1SS2wYmcwoG3QI6OQ9hKVEFyxQx8MRJJAoHoYkVJk/bS94P1dDyQ0O9otsAoIh5u0DaMqMrdwOtnPwMKo3nlsm5mY1MkGSCNCRdaB8KOFfSmEqkZx7gMvyat5qdZ9e2O2OZiERH1mAfELXrw4y3zt7k770Tadrd2RqXIi/GgubA6ripoBKY4JhbKIbeFZFjEFqwMJytlMa66xSMVcR2M93DPOfcGF1HEiEp00uz1nvSlIBXkHMud+AhGDkoVOqWdrDo2JHkyYtYrgOiXqqNGAxLggbEq3ROmB4WqYtwKlwf739022mE62dL3Z/DgvR+4NbwtyYiFR+ub/ROA92HL7bA3R5Q2w5f4vsryPTQYJnZavVUcBJ2nKgj4tkDP1UjL45atjwq0htBzP825QmICSNLrwPjbBkigFMrkgyNYUzlIlxSvUjrUQnvjl7z0hUnGUAXzsDaAhvCtXRw5nQI4ak8CJYqd+PxrSyOywFEyfuHEDxn03YPtK5uo+ZlW3f1wVQlePEF0XUkSGoG4KXSzTXPtTLjrn+cJd4enE3s1f42fv1zhHA61qZSGXa7ZmO/3o3FA1qt2je2kvUAc8+jDkEg/tsOve57miK4GaT1/HH0PN7S96mw7b702lS/vVxo9/AA==
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/activity_destroyed/EC.xml:
--------------------------------------------------------------------------------
1 | tVVdk5owFP01PNrBZKH4qLjdnXZqnXEc18dIrpDZQGyIAv76Bglfyn5Ma8cHc09ubpJzTi4W9uP8SZJD9FNQ4BayaW7huYXQGDsT/VciRYV4GFVAKBk1SS2wYmcwoG3QI6OQ9hKVEFyxQx8MRJJAoHoYkVJk/bS94P1dDyQ0O9otsAoIh5u0DaMqMrdwOtnPwMKo3nlsm5mY1MkGSCNCRdaB8KOFfSmEqkZx7gMvyat5qdZ9e2O2OZiERH1mAfELXrw4y3zt7k770Tadrd2RqXIi/GgubA6ripoBKY4JhbKIbeFZFjEFqwMJytlMa66xSMVcR2M93DPOfcGF1HEiEp00uz1nvSlIBXkHMud+AhGDkoVOqWdrDo2JHkyYtYrgOiXqqNGAxLggbEq3ROmB4WqYtwKlwf739022mE62dL3Z/DgvR+4NbwtyYiFR+ub/ROA92HL7bA3R5Q2w5f4vsryPTQYJnZavVUcBJ2nKgj4tkDP1UjL45atjwq0htBzP825QmICSNLrwPjbBkigFMrkgyNYUzlIlxSvUjrUQnvjl7z0hUnGUAXzsDaAhvCtXRw5nQI4ak8CJYqd+PxrSyOywFEyfuHEDxn03YPtK5uo+ZlW3f1wVQlePEF0XUkSGoG4KXSzTXPtTLjrn+cJd4enE3s1f42fv1zhHA61qZSGXa7ZmO/3o3FA1qt2je2kvUAc8+jDkEg/tsOve57miK4GaT1/HH0PN7S96mw7b702lS/vVxo9/AA==
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/activity_destroyed/FA.xml:
--------------------------------------------------------------------------------
1 | 1Vdbc6IwFP41PLYDiVB8VNttZy9dZ5yO7WMkETINxA1Rob9+g4RLgNZuqzu7+mDOl5Pb952TEy04i7NbgTbRD44Js4CNMwteWwA40B2rnwLJS8SHoARCQbF2aoAFfSEatDW6pZikhqPknEm6McGAJwkJpIEhIfjedFtzZq66QaFe0W6ARYAY6bktKZaRPoXb8r4jNIyqlR1b98SoctZAGiHM9y0I3lhwJjiXZSvOZoQV5FW8lOO+vNJbb0yQRL5nAJrlLH9059mDt9qtL57S6YN3oWfZIbbVB9ablXnFgODbBJNiEtuC031EJVlsUFD07pXmCotkzJTlqOaaMjbjjAtlJzxRTtP+PqtFiZAka0F637eEx0SKXLlUvRWHOohG2tw3isDKJWqpUYNIR0FYT90QpRqaq2HecpAG619fl/v7yfgJPyyX317mA7xNAkl3VOan488CELvExyOFp1LwZ9Lq8cEKet6J6PVMeh2nz68/QK93LnbBn0Slc5xVjNKo9j0BYbATj/77+HLOFo6wR9h3lPOt7NGmDihNbszI0jnbCcP14aNwxGiYKCxQ3BHVOS04o+q2nOiOmGJcrDWoiJkJJxdlZIpy1RdlNCDK2TQZHQ9ikuBJUaMKRhlKUxqY2pCMysdW+6mg7tLV1nWmmTwYeWUkavOPbaM1qjCbYQerGveqAinfioAcvwslEiGRx7Oa4KrivqJnSzB3QLAKE4QhdeWadXpIRb3CnFN1sjpcQPfSu+oEQnluPapdVzsTQaczUTeiSmJ6Ex2Cqj72x+PM68XZPdrREEmVvZ+qRWeoLEOV+69WFv90SWlfXrntvHwzK43LrjDmSKobNDkgwAZDJX48K76fSk3vn0o5CM1ogPYHUw506i/oTnS6lHvJsntvASdje3X9HN/5P50MDLz+FhbwWFFZVyrpvFDWqv1XD0HQEQgMPASH3tkfqKHKbP76lLo0fyDhzW8=
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/activity_destroyed/activity_destroyed.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/displaying_screens/activity_destroyed/activity_destroyed.gif
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/activity_destroyed/convert.sh:
--------------------------------------------------------------------------------
1 | mkdir -p tmp
2 | for f in *.xml
3 | do
4 | echo "Processing $f.."
5 | drawio-batch -q 100 $f "tmp/$f.png"
6 | done
7 |
8 | echo "Creating gif.."
9 | convert -delay 75 -loop 0 tmp/*.png ${PWD##*/}.gif
10 |
11 | rm -r tmp
12 |
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/activity_stopped/activity_stopped.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/displaying_screens/activity_stopped/activity_stopped.gif
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/activity_stopped/convert.sh:
--------------------------------------------------------------------------------
1 | mkdir -p tmp
2 | for f in *.xml
3 | do
4 | echo "Processing $f.."
5 | drawio-batch -q 100 $f "tmp/$f.png"
6 | done
7 |
8 | echo "Creating gif.."
9 | convert -delay 75 -loop 0 tmp/*.png ${PWD##*/}.gif
10 |
11 | rm -r tmp
12 |
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/configuration_changed/EA.xml:
--------------------------------------------------------------------------------
1 | tVVdk5owFP01PNrBZKH4qLjdnXZqnXEc18dIrpDZQGyIAv76Bglfyn5Ma8cHc09ubpJzTi4W9uP8SZJD9FNQ4BayaW7huYXQGDsT/VciRYV4GFVAKBk1SS2wYmcwoG3QI6OQ9hKVEFyxQx8MRJJAoHoYkVJk/bS94P1dDyQ0O9otsAoIh5u0DaMqMrdwOtnPwMKo3nlsm5mY1MkGSCNCRdaB8KOFfSmEqkZx7gMvyat5qdZ9e2O2OZiERH1mAfELXrw4y3zt7k770Tadrd2RqXIi/GgubA6ripoBKY4JhbKIbeFZFjEFqwMJytlMa66xSMVcR2M93DPOfcGF1HEiEp00uz1nvSlIBXkHMud+AhGDkoVOqWdrDo2JHkyYtYrgOiXqqNGAxLggbEq3ROmB4WqYtwKlwf739022mE62dL3Z/DgvR+4NbwtyYiFR+ub/ROA92HL7bA3R5Q2w5f4vsryPTQYJnZavVUcBJ2nKgj4tkDP1UjL45atjwq0htBzP825QmICSNLrwPjbBkigFMrkgyNYUzlIlxSvUjrUQnvjl7z0hUnGUAXzsDaAhvCtXRw5nQI4ak8CJYqd+PxrSyOywFEyfuHEDxn03YPtK5uo+ZlW3f1wVQlePEF0XUkSGoG4KXSzTXPtTLjrn+cJd4enE3s1f42fv1zhHA61qZSGXa7ZmO/3o3FA1qt2je2kvUAc8+jDkEg/tsOve57miK4GaT1/HH0PN7S96mw7b702lS/vVxo9/AA==
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/configuration_changed/OA.xml:
--------------------------------------------------------------------------------
1 | tVXbjtowEP2aPFKFGLzhEcJetFUpEkIsjyYeEmudmDqGJHx9HeLcIN1dtVRIyHM8HtvnHE8s5EXZsySH8IegwC3HppmF5pbj4NGD/i+AvATQBJdAIBktoWEDrNgZDGgb9MgoJJ1EJQRX7NAFfRHH4KsORqQUaTdtL3h31wMJzI52A6x8wuEmbcOoCkvUHbeyX4AFYbXz0DYzEamSDZCEhIq0BaFHC3lSCFWOoswDXnBX8VKue/rDbH0wCbH6ygLi5Tx/Gy+zNd6d9oNtMlvjgalyIvxoLmwOq/KKASmOMYWiiG2hWRoyBasD8YvZVEuusVBFXEdDPdwzzj3BhdRxLGKdNLs9Z7UpSAVZCzLnfgYRgZK5TqlmKw6NiUYmTBtFUJUSttSoQWJcENSlG6L0wHDVz1vuJP7+1+smXUwnW7rebL6flwN8w9uCnFhAlL75PxF4D7Zwl60+utwetvD/Isv93GQQ02nxWnXkc5IkzO/SAhlTbwWD3x7GJtwaQovxPGsHuQkoScIL70MTLIlSIOML4tiawlmipHiHyrGWbk9e8ftIiEQcpQ+fewNoAB/K1ZJj3CNHhUngRLFTtx/1aWR2WAqmT1y7AaGuG5B9JXN5H7Oq3T+uCjlXj9C5LqSIDEDdFLpYpr72l1x0zrIFXqHpxN7N36MX9+cwc3pa1cpyMNdszXb60eFA1ardo3tpL9AxuHTU5xLX2SGM7/NcnSuB6k9fyx99ze0vepsOm+9NqUvz0UaPvwE=
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/configuration_changed/configuration_changed.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/displaying_screens/configuration_changed/configuration_changed.gif
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/configuration_changed/convert.sh:
--------------------------------------------------------------------------------
1 | mkdir -p tmp
2 | for f in *.xml
3 | do
4 | echo "Processing $f.."
5 | drawio-batch -q 100 $f "tmp/$f.png"
6 | done
7 |
8 | echo "Creating gif.."
9 | convert -delay 75 -loop 0 tmp/*.png ${PWD##*/}.gif
10 |
11 | rm -r tmp
12 |
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/new_activity/AA.xml:
--------------------------------------------------------------------------------
1 | rVXbcpswEP0aHtMBKTj40SaXTjPNuONJnTx1VLQGTQVyhWxwvr7CLDa3JG3q8YO1R9Jqdc5Z4dAwLe802yRfFQfpEJeXDr12CPGoP7V/FbKvkYCSGoi14LjoBCzFCyDoIroVHPLOQqOUNGLTBSOVZRCZDsa0VkV32VrJ7qkbFuOJ7glYRkzCYNlKcJPgLfzW6s8g4qQ52XNxJmXNYgTyhHFVtCB649BQK2XqUVqGICvyGl7qfbevzB4L05CZv9mwJ3m0/v1lVTzMps/8cbW6f1lcTOosOya3eOEHthMxM0pj1WbfUKHVNuNQZXMdOi8SYWC5YVE1W1jxLZaYVNrIs8NhdVjwDrSBsgVhtXegUjB6b5c0sxNkDq1DLjEuWkIglLQ0aLYxlD4+Zj6xYwdI0D+QFQzIGnAEGZ9VrrNRJFmei6hLC5TCPFUMfrryMXxGQqvxddkO9hhwlicH3j0MFswY0NkBIa6lcJ4brX5BqKTVrSqETsPq95YQudrqCN73BvAY3pSrJYc/IkeDaZDMiF23r8Y0whMWStiKj26gtOsG6vZkru+Du9p90Et0bEhM5E17iQzTMZhBooNljtf+uIual61lo+X/9dpaSNmSnvsQ8MsxUwTkJ51MztOdpKcHcf1Bd5IRO5AzdKcXeEH2OKfkNrn/Tr9FV+WP2YU3oPV8rGYqgzM9aj33jbxpdIw2+gHebHj6vNT2PX2k6c0f
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/new_activity/AB.xml:
--------------------------------------------------------------------------------
1 | rVXbcpswEP0aHtMBKTj40SaXTjPNuONJnTx1VLQGTQVyhWxwvr7CLDa3JG3q8YO1R9Jqdc5Z4dAwLe802yRfFQfpEJeXDr12CPGoP7V/FbKvkYCSGoi14LjoBCzFCyDoIroVHPLOQqOUNGLTBSOVZRCZDsa0VkV32VrJ7qkbFuOJ7glYRkzCYNlKcJPgLfzW6s8g4qQ52XNxJmXNYgTyhHFVtCB649BQK2XqUVqGICvyGl7qfbevzB4L05CZv9mwJ3m0/v1lVTzMps/8cbW6f1lcTOosOya3eOEHthMxM0pj1WbfUKHVNuNQZXMdOi8SYWC5YVE1W1jxLZaYVNrIs8NhdVjwDrSBsgVhtXegUjB6b5c0sxNkDq1DLjEuWkIglLQ0aLYxlD4+Zj6xYwdI0D+QFQzIGnAEGZ9VrrNRJFmei6hLC5TCPFUMfrryMXxGQqvxddkO9hhwlicH3j0MFswY0NkBIa6lcJ4brX5BqKTVrSqETsPq95YQudrqCN73BvAY3pSrJYc/IkeDaZDMiF23r8Y0whMWStiKj26gtOsG6vZkru+Du9p90Et0bEhM5E17iQzTMZhBooNljtf+uIual61lo+X/9dpaSNmSnvsQ8MsxUwTkJ51MztOdpKcHcf1Bd5IRO5AzdKcXeEH2OKfkNrn/Tr9FV+WP2YU3oPV8rGYqgzM9aj33jbxpdIw2+gHebHj6vNT2PX2k6c0f
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/new_activity/AC.xml:
--------------------------------------------------------------------------------
1 | rVXbcpswEP0aHtMBKTj40SaXTjPNuONJnTx1VLQGTQVyhWxwvr7CLDa3JG3q8YO1R9Jqdc5Z4dAwLe802yRfFQfpEJeXDr12CPGoP7V/FbKvkYCSGoi14LjoBCzFCyDoIroVHPLOQqOUNGLTBSOVZRCZDsa0VkV32VrJ7qkbFuOJ7glYRkzCYNlKcJPgLfzW6s8g4qQ52XNxJmXNYgTyhHFVtCB649BQK2XqUVqGICvyGl7qfbevzB4L05CZv9mwJ3m0/v1lVTzMps/8cbW6f1lcTOosOya3eOEHthMxM0pj1WbfUKHVNuNQZXMdOi8SYWC5YVE1W1jxLZaYVNrIs8NhdVjwDrSBsgVhtXegUjB6b5c0sxNkDq1DLjEuWkIglLQ0aLYxlD4+Zj6xYwdI0D+QFQzIGnAEGZ9VrrNRJFmei6hLC5TCPFUMfrryMXxGQqvxddkO9hhwlicH3j0MFswY0NkBIa6lcJ4brX5BqKTVrSqETsPq95YQudrqCN73BvAY3pSrJYc/IkeDaZDMiF23r8Y0whMWStiKj26gtOsG6vZkru+Du9p90Et0bEhM5E17iQzTMZhBooNljtf+uIual61lo+X/9dpaSNmSnvsQ8MsxUwTkJ51MztOdpKcHcf1Bd5IRO5AzdKcXeEH2OKfkNrn/Tr9FV+WP2YU3oPV8rGYqgzM9aj33jbxpdIw2+gHebHj6vNT2PX2k6c0f
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/new_activity/convert.sh:
--------------------------------------------------------------------------------
1 | mkdir -p tmp
2 | for f in *.xml
3 | do
4 | echo "Processing $f.."
5 | drawio-batch -q 100 $f "tmp/$f.png"
6 | done
7 |
8 | echo "Creating gif.."
9 | convert -delay 75 -loop 0 tmp/*.png ${PWD##*/}.gif
10 |
11 | rm -r tmp
12 |
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/new_activity/new_activity.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/displaying_screens/new_activity/new_activity.gif
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/new_screen/convert.sh:
--------------------------------------------------------------------------------
1 | mkdir -p tmp
2 | for f in *.xml
3 | do
4 | echo "Processing $f.."
5 | drawio-batch -q 100 $f "tmp/$f.png"
6 | done
7 |
8 | echo "Creating gif.."
9 | convert -delay 75 -loop 0 tmp/*.png ${PWD##*/}.gif
10 |
11 | rm -r tmp
12 |
--------------------------------------------------------------------------------
/docs/.old/background/art/displaying_screens/new_screen/new_screen.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/displaying_screens/new_screen/new_screen.gif
--------------------------------------------------------------------------------
/docs/.old/background/art/gifs/AA.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 | 5VbLcpswFP0alu4AAoKXtpM47Uxf42nqdicjGVTLiAoRcL6+wkggMKkzqb3qsED36KLHOUdXWGCxr5YcZslHhjC1XBtVFri1XNdx7EC+auSgENtRSMwJUlgHrMgz1okKLQjCeS9RMEYFyfpgxNIUR6KHQc5Z2U/bMtqfNYOxmtHugFUEKT5J+06QSBo09I3sB0ziRLQ7Vj17qJMVkCcQsdKAwJ0FFpwx0bT21QLTmj3NS/Pd/Qu97cI4TsVrPjiwafGNPq7T5c/I+TVDj5+d54ka5QnSQm1YLVYcNAOcFSnC9SC2BeZlQgReZTCqe0spusQSsacycmRzSyhdMMq4jFOWyqT56Tr1pJgLXBmQWvcSsz0W/CBTVK+rSVUu8lRYdor4gcISQ41AJ0LlgrgduiNKNhRX47x9Xe/W4cPiPf1QBjsYeHN4sCfuCG8BFTUDTG7TJDD4XTDdMcmPBp/JBCfMqq5TtmL1Po6y0cAnjchlboZZEmum0/BAujNiwTxrjsyWVLXAF5HKG0g1olUrp6lVC15cK+/CHs8FZzusXW654Oa2fi7DH5j2+fOdU/68Efoc91r0gRP6Vtp/edFa0jE8acD/bEmzoEiqkY9D5I2JELobEARXEmH6OhGuVm6C8xbGKZrV952MIgrznER9ZnFFxLo2+DtfRT+U3RHMk6P3nb+xl7OCR/h8ScRIX6gvcGwW7REONcYxhYI89a/hMWLVDF8YORZeXYfCvoQBGGjT7Ed9ZV6bg4HAoKCB4UETkMdYnAx01Lnd9tulv/kPj58/oHzkDrnQ8ZNh9wfWSNb9yIK7Pw==
6 |
7 |
--------------------------------------------------------------------------------
/docs/.old/background/art/gifs/AA2.xml:
--------------------------------------------------------------------------------
1 | 5VbLcpswFP0alu4AAoKXtpM47Uxf42nqdicjGVTLiAoRcL6+wkggMKkzqb3qsED36KLHOUdXWGCxr5YcZslHhjC1XBtVFri1XNdx7EC+auSgENtRSMwJUlgHrMgz1okKLQjCeS9RMEYFyfpgxNIUR6KHQc5Z2U/bMtqfNYOxmtHugFUEKT5J+06QSBo09I3sB0ziRLQ7Vj17qJMVkCcQsdKAwJ0FFpwx0bT21QLTmj3NS/Pd/Qu97cI4TsVrPjiwafGNPq7T5c/I+TVDj5+d54ka5QnSQm1YLVYcNAOcFSnC9SC2BeZlQgReZTCqe0spusQSsacycmRzSyhdMMq4jFOWyqT56Tr1pJgLXBmQWvcSsz0W/CBTVK+rSVUu8lRYdor4gcISQ41AJ0LlgrgduiNKNhRX47x9Xe/W4cPiPf1QBjsYeHN4sCfuCG8BFTUDTG7TJDD4XTDdMcmPBp/JBCfMqq5TtmL1Po6y0cAnjchlboZZEmum0/BAujNiwTxrjsyWVLXAF5HKG0g1olUrp6lVC15cK+/CHs8FZzusXW654Oa2fi7DH5j2+fOdU/68Efoc91r0gRP6Vtp/edFa0jE8acD/bEmzoEiqkY9D5I2JELobEARXEmH6OhGuVm6C8xbGKZrV952MIgrznER9ZnFFxLo2+DtfRT+U3RHMk6P3nb+xl7OCR/h8ScRIX6gvcGwW7REONcYxhYI89a/hMWLVDF8YORZeXYfCvoQBGGjT7Ed9ZV6bg4HAoKCB4UETkMdYnAx01Lnd9tulv/kPj58/oHzkDrnQ8ZNh9wfWSNb9yIK7Pw==
--------------------------------------------------------------------------------
/docs/.old/background/art/gifs/AA3.xml:
--------------------------------------------------------------------------------
1 | 5VbLcpswFP0alu4AAoKXtpM47Uxf42nqdicjGVTLiAoRcL6+wkggMKkzqb3qsED36KLHOUdXWGCxr5YcZslHhjC1XBtVFri1XNdx7EC+auSgENtRSMwJUlgHrMgz1okKLQjCeS9RMEYFyfpgxNIUR6KHQc5Z2U/bMtqfNYOxmtHugFUEKT5J+06QSBo09I3sB0ziRLQ7Vj17qJMVkCcQsdKAwJ0FFpwx0bT21QLTmj3NS/Pd/Qu97cI4TsVrPjiwafGNPq7T5c/I+TVDj5+d54ka5QnSQm1YLVYcNAOcFSnC9SC2BeZlQgReZTCqe0spusQSsacycmRzSyhdMMq4jFOWyqT56Tr1pJgLXBmQWvcSsz0W/CBTVK+rSVUu8lRYdor4gcISQ41AJ0LlgrgduiNKNhRX47x9Xe/W4cPiPf1QBjsYeHN4sCfuCG8BFTUDTG7TJDD4XTDdMcmPBp/JBCfMqq5TtmL1Po6y0cAnjchlboZZEmum0/BAujNiwTxrjsyWVLXAF5HKG0g1olUrp6lVC15cK+/CHs8FZzusXW654Oa2fi7DH5j2+fOdU/68Efoc91r0gRP6Vtp/edFa0jE8acD/bEmzoEiqkY9D5I2JELobEARXEmH6OhGuVm6C8xbGKZrV952MIgrznER9ZnFFxLo2+DtfRT+U3RHMk6P3nb+xl7OCR/h8ScRIX6gvcGwW7REONcYxhYI89a/hMWLVDF8YORZeXYfCvoQBGGjT7Ed9ZV6bg4HAoKCB4UETkMdYnAx01Lnd9tulv/kPj58/oHzkDrnQ8ZNh9wfWSNb9yIK7Pw==
--------------------------------------------------------------------------------
/docs/.old/background/art/gifs/IA.xml:
--------------------------------------------------------------------------------
1 | 5Vddk5owFP01PG4HCCA+uu7WbWf6NU533b5FEiE1EhqC4P76Bkj4EkdnqvvS8YHk5HKTnHNuggaY74oFh0n0hSFMDdtEhQEeDNu2LNOTjxI5KMS0FBJyghTWAkvyhnWgQjOCcNoLFIxRQZI+GLA4xoHoYZBzlvfDNoz2Z01gqGY0W2AZQIqPwl4IElGN+m4n+gmTMBLNjtXIDupgBaQRRCzvQODRAHPOmKhbu2KOacme5qV+7+OJ0WZhHMfikhcObJr9pM+rePErsH7P0PM36+3OrrPsIc3UhtVixUEzwFkWI1wmMQ1wn0dE4GUCg3I0l6JLLBI7KnuWbG4IpXNGGZf9mMUy6P54nWrpe8wFLjqQWvcCsx0W/CBD1KitSVUuclQ3bxVxPYVFHTU8HQiVC8ImdUuUbCiuxnn7sdqu/Kf5J/o597bQc+7hwRzlzaOiZIDJbXYJ9P5kTA/cpZXBZzLA8pOiHZStUD2rLGsNfNWIXOZ6GCWxejoND6Q7IxZMk7pkNqQoBb6KVM5AqhGtGjm7WjXg1bVyruzxVHC2xdrlhg0mD+XvOvyBaZ8/1zrmzxmhz7JvRR84om+p/ZdmjSWtjic78D9bsnugSKo3G+wFwZgIaDJdm+aNRJheJsLNjhvvvIVxjGblfSd7AYVpSoI+s7ggYlUa/IOreq/K7gimUeX9KiyW6+3Eld1XNXaS2ZRlPMDnj0uM9GV7gv/ugT7Cr8Y4plCQff+KHiNdzfCdkepQ1meU35fXAwPd6v2ot7pX6iARGBx2TWKdSEAeYnGUqPJAs+2LbDF6e08uKk37fUoTudhHzlhp+vYaeN6NStN9v9Ic1cD//zRwBvVj304D2W2/kOuyaf9ogMe/
--------------------------------------------------------------------------------
/docs/.old/background/art/gifs/JA.xml:
--------------------------------------------------------------------------------
1 | 5Vdbk5owGP01PG4HCER8VHfrtjO9jdNd27dIIqRGQkNQ3F/fIAk32epMdV86PpCcfORyzvm+oAVm22IuUBp/4pgwy7VxYYF7y3Udx4bqUSIHjdiORiJBscYaYEFfiAnUaE4xyTqBknMmadoFQ54kJJQdDAnB992wNWfdVVMU6RXtBliEiJGTsGeKZVyhgd+KfiQ0imV9Yj2yRSZYA1mMMN+3IPBggZngXFatbTEjrGTP8FK99/6V0XpjgiTykhcOfJx/Z0/LZP4zdH5N8NMX5+XOrWbZIZbrA+vNyoNhQPA8waScxLbAdB9TSRYpCsvRvRJdYbHcMtVzVHNNGZtxxoXqJzxRQdPTfeqt74iQpGhBet9zwrdEioMK0aOuIVW7yNPdfaOIDzUWt9SAJhBpF0T11A1RqqG5Gubt23KzDB5nH9jHPdwg6E3RwR7kDTJZMsDVMdsEwt85NwN32dHgExXgBGnRDKpWpJ/HWVYG+GwQtc1VP0ph1XIG7kl3RiyUpVXKrGlRCnwVqbyeVANa1XK2tarBq2vlXdnjmRR8Q4zLLReM7svfdfgD4y5/vnPKnzdAn+Peij5wQt/C+C/La0s6LU+24H+2ZLugKKrXawLDcEgEPBqvbPtGIowvE+Fm5QaetzBJ8KS871QvZCjLaNhllhRULkuDv/N174e2O0ZZfPS+8zf2Mp6LkJwviQSbC/UVjttFe4BDgwnCkKS77jU8RKxe4Sunx8Jr6lDQlRCCnjbVefRb7WuzNxHoFTTQTzSJRETkyURHnetjXyT94A09uij93LdJP+yTAHtD6Re4KwDhjdLPf7v0G9Qg+A818Hu2H7jHr6SB6jZfwVXaNH8mwMMf
--------------------------------------------------------------------------------
/docs/.old/background/art/gifs/JA2.xml:
--------------------------------------------------------------------------------
1 | 5Vdbk5owGP01PG4HCER8VHfrtjO9jdNd27dIIqRGQkNQ3F/fIAk32epMdV86PpCcfORyzvm+oAVm22IuUBp/4pgwy7VxYYF7y3Udx4bqUSIHjdiORiJBscYaYEFfiAnUaE4xyTqBknMmadoFQ54kJJQdDAnB992wNWfdVVMU6RXtBliEiJGTsGeKZVyhgd+KfiQ0imV9Yj2yRSZYA1mMMN+3IPBggZngXFatbTEjrGTP8FK99/6V0XpjgiTykhcOfJx/Z0/LZP4zdH5N8NMX5+XOrWbZIZbrA+vNyoNhQPA8waScxLbAdB9TSRYpCsvRvRJdYbHcMtVzVHNNGZtxxoXqJzxRQdPTfeqt74iQpGhBet9zwrdEioMK0aOuIVW7yNPdfaOIDzUWt9SAJhBpF0T11A1RqqG5Gubt23KzDB5nH9jHPdwg6E3RwR7kDTJZMsDVMdsEwt85NwN32dHgExXgBGnRDKpWpJ/HWVYG+GwQtc1VP0ph1XIG7kl3RiyUpVXKrGlRCnwVqbyeVANa1XK2tarBq2vlXdnjmRR8Q4zLLReM7svfdfgD4y5/vnPKnzdAn+Peij5wQt/C+C/La0s6LU+24H+2ZLugKKrXawLDcEgEPBqvbPtGIowvE+Fm5QaetzBJ8KS871QvZCjLaNhllhRULkuDv/N174e2O0ZZfPS+8zf2Mp6LkJwviQSbC/UVjttFe4BDgwnCkKS77jU8RKxe4Sunx8Jr6lDQlRCCnjbVefRb7WuzNxHoFTTQTzSJRETkyURHnetjXyT94A09uij93LdJP+yTAHtD6Re4KwDhjdLPf7v0G9Qg+A818Hu2H7jHr6SB6jZfwVXaNH8mwMMf
--------------------------------------------------------------------------------
/docs/.old/background/art/gifs/JA3.xml:
--------------------------------------------------------------------------------
1 | 5Vdbk5owGP01PG4HCER8VHfrtjO9jdNd27dIIqRGQkNQ3F/fIAk32epMdV86PpCcfORyzvm+oAVm22IuUBp/4pgwy7VxYYF7y3Udx4bqUSIHjdiORiJBscYaYEFfiAnUaE4xyTqBknMmadoFQ54kJJQdDAnB992wNWfdVVMU6RXtBliEiJGTsGeKZVyhgd+KfiQ0imV9Yj2yRSZYA1mMMN+3IPBggZngXFatbTEjrGTP8FK99/6V0XpjgiTykhcOfJx/Z0/LZP4zdH5N8NMX5+XOrWbZIZbrA+vNyoNhQPA8waScxLbAdB9TSRYpCsvRvRJdYbHcMtVzVHNNGZtxxoXqJzxRQdPTfeqt74iQpGhBet9zwrdEioMK0aOuIVW7yNPdfaOIDzUWt9SAJhBpF0T11A1RqqG5Gubt23KzDB5nH9jHPdwg6E3RwR7kDTJZMsDVMdsEwt85NwN32dHgExXgBGnRDKpWpJ/HWVYG+GwQtc1VP0ph1XIG7kl3RiyUpVXKrGlRCnwVqbyeVANa1XK2tarBq2vlXdnjmRR8Q4zLLReM7svfdfgD4y5/vnPKnzdAn+Peij5wQt/C+C/La0s6LU+24H+2ZLugKKrXawLDcEgEPBqvbPtGIowvE+Fm5QaetzBJ8KS871QvZCjLaNhllhRULkuDv/N174e2O0ZZfPS+8zf2Mp6LkJwviQSbC/UVjttFe4BDgwnCkKS77jU8RKxe4Sunx8Jr6lDQlRCCnjbVefRb7WuzNxHoFTTQTzSJRETkyURHnetjXyT94A09uij93LdJP+yTAHtD6Re4KwDhjdLPf7v0G9Qg+A818Hu2H7jHr6SB6jZfwVXaNH8mwMMf
--------------------------------------------------------------------------------
/docs/.old/background/art/gifs/SA.xml:
--------------------------------------------------------------------------------
1 | 1VZdk5owFP01PNrhe/FR3a3bzrTbHWe3bt8iiZAaCQ1B0F/fAAnfjs5UHzo8kJxcbpJzTm7QrMU+XzIQh98oREQzdZhr1qNmmoahu+JVIEeJ6IZEAoahxBpghU9IBUo0xRAlnUBOKeE47oI+jSLk8w4GGKNZN2xLSXfWGARyRr0BVj4gaBD2E0MeVqjntKKfEQ5CXu9YjuyBCpZAEgJIsxZkPWnWglHKq9Y+XyBSsKd4qb77fGa0XhhDEb/mgyOdpm/kfR0tf/nG7xl8fzFOE7PKcgAklRuWi+VHxQCjaQRRkUTXrHkWYo5WMfCL0UyILrCQ74noGaK5xYQsKKFM9CMaiaD5cJ1y6QfEOMpbkFz3EtE94uwoQuSoqUiVLrJlN2sUcVyJhS01XBUIpAuCOnVDlGhIrsZ5e13v1t7z4gv5mrk74NpzcNRHeXMJLxigYpttAt0/KVUDk6Q0+EwEGF6cN4OiFch3mWWjgO8KEcvc9KMEVk2n4J50F8QCSVwdmS3OC4FvIpXdk2pEq1rOtlY1eHOt7Bt7POGM7pByuWZaD4/Fcxv+rGmXP8cY8meP0GeY96LPGtC3Uv5L0tqSRsuTLfifLdkuKIJq6CAP2mMieObGct07iTC9ToS7lRv3soVRBGfFfSd6PgFJgv0usyjHfF0Y/JMjex/S7hAkYen9MiwS623FFd0POXaW2YSmzEeXyyWC6rI9w3+7oI/wqzCGCOD40L2ix0iXM/yguCzKqkZ5XXldq6dbtR/5VftK7SWyesWuTqwSccACxAeJSg/U277KFsZE907uq+28YKgH6G32wHYjle1/OJqDczjiqbNH03Z6lDt3O5qi2/ydVZI1P7nW018=
--------------------------------------------------------------------------------
/docs/.old/background/art/gifs/convert.sh:
--------------------------------------------------------------------------------
1 | mkdir -p tmp
2 | for f in *.xml
3 | do
4 | echo "Processing $f.."
5 | drawio-batch -q 100 $f "tmp/$f.png"
6 | done
7 |
8 | echo "Creating gif.."
9 | convert -delay 75 -loop 0 tmp/*.png scene_ui.gif
10 |
11 | rm -r tmp
12 |
--------------------------------------------------------------------------------
/docs/.old/background/art/gifs/scene_ui.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/gifs/scene_ui.gif
--------------------------------------------------------------------------------
/docs/.old/background/art/mobile_applications/activity_lifecycle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/mobile_applications/activity_lifecycle.png
--------------------------------------------------------------------------------
/docs/.old/background/art/mobile_applications/messaging.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/mobile_applications/messaging.png
--------------------------------------------------------------------------------
/docs/.old/background/art/mobile_applications/state_losing.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/background/art/mobile_applications/state_losing.gif
--------------------------------------------------------------------------------
/docs/.old/background/index.md:
--------------------------------------------------------------------------------
1 | # Background
2 |
3 | Building modular, stable and testable applications is difficult when using the
4 | components provided by the Android framework.
5 | Activities and Fragments carry a lot of responsibilities: they are designed to
6 | handle the lifecycle, the UI, permission callbacks, navigation to other screens
7 | and much more.
8 | Screen navigation is typically handled by the screens themselves using
9 | `Activity.startActivity` or dealing with the `FragmentManager`, leading to
10 | extensive coupling.
11 |
12 | Testing code that uses these framework-provided components isn't trivial either:
13 | often you need to run platform code which isn't available on the JVM.
14 | This requires you to execute the tests on an actual device or an emulator, which
15 | can be painfully slow.
16 |
17 | Activities and Fragments also don't provide the flexibility you need to create
18 | your own screen transition animations.
19 |
20 | This section covers some background: what are the characteristics of mobile
21 | applications and how can all this be modeled in a modular and testable way?
22 |
23 | - [Mobile Applications](mobile_applications)
24 | - [Application Flow](application_flow)
25 | - [Saving and restoring state](saving_and_restoring_state)
26 | - [Deep Linking](deep_linking)
27 |
--------------------------------------------------------------------------------
/docs/.old/concepts/index.md:
--------------------------------------------------------------------------------
1 | # Concepts
2 |
3 | Acorn separates the view from the navigation layer by letting the view layer
4 | subscribe to screen changes in the navigation layer.
5 | The navigation layer reacts to user input to modify its navigation state and
6 | publishes the new screen object.
7 | The view layer observes these screen changes and changes its UI conform to the
8 | new screen.
9 |
10 | In Acorn, screens are represented by Scenes and Navigators control the
11 | navigation state.
12 | On these pages you can learn more about the concepts of Acorn.
13 |
14 | * [Scenes](scenes)
15 | * [Navigators](navigators)
16 | * [The view layer](view_layer)
17 |
--------------------------------------------------------------------------------
/docs/.old/concepts/navigators/art/navigation_tree/convert.sh:
--------------------------------------------------------------------------------
1 | mkdir -p tmp
2 | for f in *.xml
3 | do
4 | echo "Processing $f.."
5 | drawio-batch -q 100 $f "tmp/$f.png"
6 | done
7 |
8 | echo "Creating gif.."
9 | convert -delay 150 -loop 0 tmp/*.png ${PWD##*/}.gif
10 |
11 | rm -r tmp
12 |
--------------------------------------------------------------------------------
/docs/.old/concepts/navigators/art/navigation_tree/navigation_tree.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/concepts/navigators/art/navigation_tree/navigation_tree.gif
--------------------------------------------------------------------------------
/docs/.old/concepts/scenes/art/scene_lifecycle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/concepts/scenes/art/scene_lifecycle.png
--------------------------------------------------------------------------------
/docs/.old/usage/activity_controller_factories.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/.old/usage/activity_controller_factories.md
--------------------------------------------------------------------------------
/docs/.old/usage/index.md:
--------------------------------------------------------------------------------
1 | This section explains how you can use Acorn.
2 |
3 | * [Setup](setup)
4 | * [Getting Started](getting_started)
5 | * [Scenes](scenes)
6 | * [Navigators](navigators)
7 | * [Transition animations](transition_animations)
8 | * [ViewControllers](viewcontrollers)
9 | * [ViewControllerFactories](viewcontrollerfactories)
10 |
--------------------------------------------------------------------------------
/docs/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id "com.eden.orchidPlugin" version "0.21.1"
3 | }
4 |
5 | dependencies {
6 | orchidRuntime "io.github.javaeden.orchid:OrchidDocs:0.21.1"
7 | orchidRuntime "io.github.javaeden.orchid:OrchidKotlindoc:0.21.1"
8 | orchidRuntime "io.github.javaeden.orchid:OrchidPluginDocs:0.21.1"
9 | orchidRuntime "io.github.javaeden.orchid:OrchidSyntaxHighlighter:0.21.1"
10 | orchidRuntime "io.github.javaeden.orchid:OrchidGithub:0.21.1"
11 | }
12 |
13 | repositories {
14 | mavenCentral()
15 | maven { url = "https://kotlin.bintray.com/kotlinx/" }
16 | jcenter()
17 | }
18 |
19 | orchid {
20 | theme = "Editorial"
21 | baseUrl = "https://nhaarman.github.io/acorn"
22 | version = git.versionName()
23 |
24 | githubToken = "${System.getenv('GITHUB_TOKEN')}"
25 | }
26 |
--------------------------------------------------------------------------------
/docs/readme.md:
--------------------------------------------------------------------------------
1 | # Documentation
2 |
3 | Acorn's documentation site is built using Orchid, and can be found on
4 | https://nhaarman.github.io/acorn/.
5 |
6 | Deploying the site is done by pushing to the `gh-pages` branch, and can be done
7 | as follows:
8 |
9 | ```
10 | ./gradlew orchidDeploy -PversionName=x.x.x
11 | ```
12 |
--------------------------------------------------------------------------------
/docs/src/orchid/resources/assets/css/site.scss:
--------------------------------------------------------------------------------
1 | article {
2 | max-width: 60em;
3 | margin-left: auto;
4 | margin-right: auto;
5 | }
6 |
--------------------------------------------------------------------------------
/docs/src/orchid/resources/assets/media/scene_lifecycle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/src/orchid/resources/assets/media/scene_lifecycle.png
--------------------------------------------------------------------------------
/docs/src/orchid/resources/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/src/orchid/resources/favicon.ico
--------------------------------------------------------------------------------
/docs/src/orchid/resources/media/class_diagram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/src/orchid/resources/media/class_diagram.png
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | extraCss:
3 | - |
4 | inline:.scss:
5 | .image-preview {
6 | text-align: center;
7 | img {
8 | max-width:80%;
9 | }
10 | }
11 | ---
12 |
13 | Acorn is built to provide a fresh perspective on in-app navigation.
14 | Its core APIs are carefully designed to describe the basics of screens and
15 | navigation, keeping them as pure as possible.
16 |
17 | On top of this core, Acorn provides an extensive set of default implementations
18 | to do the work for you.
19 |
20 |
21 | ### The core
22 |
23 | ### The user interface
24 |
25 | In
26 |
27 |
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/activity/media/new_activity/AA.xml:
--------------------------------------------------------------------------------
1 | rVXbcpswEP0aHtMBKTj40SaXTjPNuONJnTx1VLQGTQVyhWxwvr7CLDa3JG3q8YO1R9Jqdc5Z4dAwLe802yRfFQfpEJeXDr12CPGoP7V/FbKvkYCSGoi14LjoBCzFCyDoIroVHPLOQqOUNGLTBSOVZRCZDsa0VkV32VrJ7qkbFuOJ7glYRkzCYNlKcJPgLfzW6s8g4qQ52XNxJmXNYgTyhHFVtCB649BQK2XqUVqGICvyGl7qfbevzB4L05CZv9mwJ3m0/v1lVTzMps/8cbW6f1lcTOosOya3eOEHthMxM0pj1WbfUKHVNuNQZXMdOi8SYWC5YVE1W1jxLZaYVNrIs8NhdVjwDrSBsgVhtXegUjB6b5c0sxNkDq1DLjEuWkIglLQ0aLYxlD4+Zj6xYwdI0D+QFQzIGnAEGZ9VrrNRJFmei6hLC5TCPFUMfrryMXxGQqvxddkO9hhwlicH3j0MFswY0NkBIa6lcJ4brX5BqKTVrSqETsPq95YQudrqCN73BvAY3pSrJYc/IkeDaZDMiF23r8Y0whMWStiKj26gtOsG6vZkru+Du9p90Et0bEhM5E17iQzTMZhBooNljtf+uIual61lo+X/9dpaSNmSnvsQ8MsxUwTkJ51MztOdpKcHcf1Bd5IRO5AzdKcXeEH2OKfkNrn/Tr9FV+WP2YU3oPV8rGYqgzM9aj33jbxpdIw2+gHebHj6vNT2PX2k6c0f
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/activity/media/new_activity/AB.xml:
--------------------------------------------------------------------------------
1 | rVXbcpswEP0aHtMBKTj40SaXTjPNuONJnTx1VLQGTQVyhWxwvr7CLDa3JG3q8YO1R9Jqdc5Z4dAwLe802yRfFQfpEJeXDr12CPGoP7V/FbKvkYCSGoi14LjoBCzFCyDoIroVHPLOQqOUNGLTBSOVZRCZDsa0VkV32VrJ7qkbFuOJ7glYRkzCYNlKcJPgLfzW6s8g4qQ52XNxJmXNYgTyhHFVtCB649BQK2XqUVqGICvyGl7qfbevzB4L05CZv9mwJ3m0/v1lVTzMps/8cbW6f1lcTOosOya3eOEHthMxM0pj1WbfUKHVNuNQZXMdOi8SYWC5YVE1W1jxLZaYVNrIs8NhdVjwDrSBsgVhtXegUjB6b5c0sxNkDq1DLjEuWkIglLQ0aLYxlD4+Zj6xYwdI0D+QFQzIGnAEGZ9VrrNRJFmei6hLC5TCPFUMfrryMXxGQqvxddkO9hhwlicH3j0MFswY0NkBIa6lcJ4brX5BqKTVrSqETsPq95YQudrqCN73BvAY3pSrJYc/IkeDaZDMiF23r8Y0whMWStiKj26gtOsG6vZkru+Du9p90Et0bEhM5E17iQzTMZhBooNljtf+uIual61lo+X/9dpaSNmSnvsQ8MsxUwTkJ51MztOdpKcHcf1Bd5IRO5AzdKcXeEH2OKfkNrn/Tr9FV+WP2YU3oPV8rGYqgzM9aj33jbxpdIw2+gHebHj6vNT2PX2k6c0f
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/activity/media/new_activity/AC.xml:
--------------------------------------------------------------------------------
1 | rVXbcpswEP0aHtMBKTj40SaXTjPNuONJnTx1VLQGTQVyhWxwvr7CLDa3JG3q8YO1R9Jqdc5Z4dAwLe802yRfFQfpEJeXDr12CPGoP7V/FbKvkYCSGoi14LjoBCzFCyDoIroVHPLOQqOUNGLTBSOVZRCZDsa0VkV32VrJ7qkbFuOJ7glYRkzCYNlKcJPgLfzW6s8g4qQ52XNxJmXNYgTyhHFVtCB649BQK2XqUVqGICvyGl7qfbevzB4L05CZv9mwJ3m0/v1lVTzMps/8cbW6f1lcTOosOya3eOEHthMxM0pj1WbfUKHVNuNQZXMdOi8SYWC5YVE1W1jxLZaYVNrIs8NhdVjwDrSBsgVhtXegUjB6b5c0sxNkDq1DLjEuWkIglLQ0aLYxlD4+Zj6xYwdI0D+QFQzIGnAEGZ9VrrNRJFmei6hLC5TCPFUMfrryMXxGQqvxddkO9hhwlicH3j0MFswY0NkBIa6lcJ4brX5BqKTVrSqETsPq95YQudrqCN73BvAY3pSrJYc/IkeDaZDMiF23r8Y0whMWStiKj26gtOsG6vZkru+Du9p90Et0bEhM5E17iQzTMZhBooNljtf+uIual61lo+X/9dpaSNmSnvsQ8MsxUwTkJ51MztOdpKcHcf1Bd5IRO5AzdKcXeEH2OKfkNrn/Tr9FV+WP2YU3oPV8rGYqgzM9aj33jbxpdIw2+gHebHj6vNT2PX2k6c0f
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/activity/media/new_activity/convert.sh:
--------------------------------------------------------------------------------
1 | mkdir -p tmp
2 | for f in *.xml
3 | do
4 | echo "Processing $f.."
5 | drawio-batch -q 100 $f "tmp/$f.png"
6 | done
7 |
8 | echo "Creating gif.."
9 | convert -delay 75 -loop 0 tmp/*.png ${PWD##*/}.gif
10 |
11 | rm -r tmp
12 |
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/activity/media/new_activity/new_activity.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/src/orchid/resources/wiki/activity/media/new_activity/new_activity.gif
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/displaying_scenes/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 'About'
3 |
4 | extraCss:
5 | - |
6 | inline:.scss:
7 | .image-preview {
8 | text-align: center;
9 | img {
10 | max-width:80%;
11 | }
12 | }
13 | ---
14 |
15 | Acorn regards the Activity as a window into the application.
16 | In fact, the Activity provides a Window instance that is used to display the user
17 | interface to the user.
18 | The decoupling of navigation from the user interface allows us the Activity as a
19 | plugin in the application: an Activity appearing registers itself as a listener
20 | with the {{ anchor('Navigator') }} to indicate that its interested in
21 | {{ anchor('Scene') }} events.
22 | Upon receiving these events, it can act appropriately and display the proper user
23 | interface, attaching it to the Scene as necessary.
24 |
25 | In the following couple of sections the concepts of displaying scenes are
26 | explained:
27 |
28 | - [The ViewController](viewcontroller)
29 | - [Mapping Scenes to layouts](mapping_scenes_layouts)
30 | - [Transition Animations](transition_animations)
31 |
32 |
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/experimental.md:
--------------------------------------------------------------------------------
1 | Acorn includes a couple of features that are considered experimental.
2 | They bring certain APIs to Acorn that have yet to prove themselves.
3 | These features live in a separate artifact,
4 | `com.nhaarman.acorn.ext:acorn-experimental`.
5 |
6 | Currently, there are the following experimental features:
7 |
8 | * [ConcurrentPairNavigator](experimental/concurrentpairnavigator)
9 |
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/experimental/media/overlay_example.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/src/orchid/resources/wiki/experimental/media/overlay_example.gif
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/experimental/media/scene_lifecycle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/docs/src/orchid/resources/wiki/experimental/media/scene_lifecycle.png
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/navigators.md:
--------------------------------------------------------------------------------
1 | ---
2 | pageId: 'navigators'
3 | ---
4 |
5 | Navigators are the glue that ties everything together.
6 | They can provide a specific flow in the application built up of several Scenes,
7 | or combine multiple specific flows into one larger flow.
8 |
9 | On these pages you can find out all about Navigators:
10 |
11 | * [About Navigators](about)
12 | * [The Navigator interface](interface)
13 | * [Saving state](state_saving)
14 | * [Base implementations](base_implementations)
15 | * [Composing implementations](composing_implementations)
16 | * Advanced
17 | * [Scene Management](advanced/scene_management)
18 |
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/scenes.md:
--------------------------------------------------------------------------------
1 | ---
2 | ---
3 |
4 | Scenes are the basic building blocks of your application's navigation flow.
5 | They represent very simple user-faced states in the application, such as a
6 | registration page or a loading screen.
7 |
8 | On these pages you can find out all about Scenes:
9 |
10 | * [About Scenes](about)
11 | * [The Scene interface](interface)
12 | * [Saving state](state_saving)
13 | * [Base implementations](base_implementations)
14 |
--------------------------------------------------------------------------------
/docs/src/orchid/resources/wiki/scenes/media/scene_events.drawio:
--------------------------------------------------------------------------------
1 | 1VdBd9owDP41OW4viUlIj4VS1r2tFw5rj14iEg8nZsZA6K+fTBRCmpS2r/C2wQHrk+RYnyQrOGycl1PNl9l3lYB0fDcpHXbj+L7H/CH+WGRXIZEXVUCqRUJGDTATT0CgS+haJLBqGRqlpBHLNhirooDYtDCutdq2zeZKtp+65Cl0gFnMZRf9IRKTURSB2+BfQKRZ/WTPJU3Oa2MCVhlP1PYIYhOHjbVSplrl5RikJa/mpfK7fUF7OJiGwrzFYSzjcnP3NH1Y7JQLbDpdJF8/sWqXDZdrCpgOa3Y1A1qtiwTsJq7DRttMGJgteWy1W8w5YpnJJUoeLmk70AbKF8/pHaLHsgGVg9E7NCEHPyLCqGJYSPK24d+vWc6OuPcHBHLKeXrYu6EFF8TMO1gKOqRAglVCotImU6kquJw06KhNW2PzTaklkfULjNlRyfO1UW0qoRTmwbp/Dkh6pM3s+qY8Fna1UGC4R05WfKz3s0Ljtpdqvyo+G9TppCEHaq1jOMFV3aRcp2BO2Pn9RaBBciM27XOcPaFep+xnMRRwova912t/LqQcK6n03pfNoxjiGPGV0WoBR5qfUTAI3PN0C/Pb3RJ43W7x/J5uCS/VLH6H28kGg1l9jNwLUDVw/zZVYc/tG0pja0lhTDiuOPVa+Htt58RojO0nQKPqHrYNjKuUfnlumZOV5N45NiACaxNS3lYPqT2fZQd5Nu0UtOu4UAX0FP3+gziXIi0Qw7YyeF42sqkTOFevSZGLJNlflH2Jb1+e58j986Fy1c39oG+mXCr10b8zUmrN+0ZKM0T6R4rCjApjJeb2XYLXkf2ed/YM/4fZM3yt6eMDSU17s4jbb7fj7/lGpNygwxv7+iMjDbwkgGFfNq/CIeNhN+0XuLb9nvfBc13bKDYv5Hvd0d8aNvkD
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-appcompat/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.android.library")
3 | id("kotlin-android")
4 |
5 | id("digital.wup.android-maven-publish")
6 | id("signing")
7 | }
8 |
9 | java {
10 | sourceCompatibility = JavaVersion.VERSION_17
11 | targetCompatibility = JavaVersion.VERSION_17
12 | }
13 |
14 | android {
15 | kotlinOptions {
16 | jvmTarget = "17"
17 | }
18 |
19 | compileOptions {
20 | sourceCompatibility JavaVersion.VERSION_17
21 | targetCompatibility JavaVersion.VERSION_17
22 | }
23 |
24 | defaultConfig {
25 | minSdkVersion(21)
26 | }
27 | namespace "com.nhaarman.acorn.android.appcompat"
28 | }
29 |
30 | dependencies {
31 | api project(':ext-acorn-android')
32 |
33 | api "androidx.appcompat:appcompat"
34 |
35 |
36 | compileOnly "androidx.annotation:annotation"
37 |
38 | testImplementation "com.nhaarman:expect.kt"
39 | testImplementation "org.mockito.kotlin:mockito-kotlin"
40 | testImplementation "org.junit.jupiter:junit-jupiter-api"
41 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
42 | }
43 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-appcompat/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn.ext
2 | artifactId=acorn-android-appcompat
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-lifecycle/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn.ext
2 | artifactId=acorn-android-lifecycle
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-lint/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.jetbrains.kotlin.jvm")
3 | }
4 |
5 | java {
6 | sourceCompatibility = JavaVersion.VERSION_17
7 | targetCompatibility = JavaVersion.VERSION_17
8 | }
9 |
10 | compileKotlin {
11 | kotlinOptions {
12 | jvmTarget = "17"
13 | }
14 | }
15 |
16 | dependencies {
17 | compileOnly "com.android.tools.lint:lint-api"
18 | compileOnly "com.android.tools.lint:lint-checks"
19 |
20 | testImplementation "org.junit.jupiter:junit-jupiter-api"
21 | testImplementation "org.junit.jupiter:junit-jupiter-engine"
22 | testImplementation "com.android.tools.lint:lint"
23 | testImplementation "com.android.tools.lint:lint-tests"
24 | }
25 |
26 | jar {
27 | manifest {
28 | attributes("Lint-Registry-v2": "com.nhaarman.acorn.lint.AcornIssueRegistry")
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-lint/src/main/java/com/nhaarman/acorn/lint/AcornIssueRegistry.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.lint
18 |
19 | import com.android.tools.lint.client.api.IssueRegistry
20 | import com.android.tools.lint.detector.api.CURRENT_API
21 | import com.android.tools.lint.detector.api.Issue
22 |
23 | class AcornIssueRegistry : IssueRegistry() {
24 |
25 | override val api = CURRENT_API
26 |
27 | override val issues: List
28 | get() = listOf(
29 | RxSceneDisposablesUsageDetector.issue,
30 | )
31 | }
32 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-statechecks/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.android.library")
3 | id("kotlin-android")
4 |
5 | id("digital.wup.android-maven-publish")
6 | id("signing")
7 | }
8 |
9 | java {
10 | sourceCompatibility = JavaVersion.VERSION_17
11 | targetCompatibility = JavaVersion.VERSION_17
12 | }
13 |
14 | android {
15 | kotlinOptions {
16 | jvmTarget = "17"
17 | }
18 |
19 | compileOptions {
20 | sourceCompatibility JavaVersion.VERSION_17
21 | targetCompatibility JavaVersion.VERSION_17
22 | }
23 |
24 | defaultConfig {
25 | minSdkVersion(21)
26 | }
27 | namespace "com.nhaarman.acorn.android.experimental.statechecks"
28 | }
29 |
30 | dependencies {
31 | api project(':ext-acorn-android')
32 |
33 |
34 | compileOnly "androidx.annotation:annotation"
35 |
36 | testImplementation "com.nhaarman:expect.kt"
37 | testImplementation "org.mockito.kotlin:mockito-kotlin"
38 | testImplementation "org.junit.jupiter:junit-jupiter-api"
39 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
40 | }
41 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-statechecks/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn.ext
2 | artifactId=acorn-android-statechecks
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-statechecks/readme.md:
--------------------------------------------------------------------------------
1 | ## Experimental StateChecker API
2 |
3 | The classes in this module provide a way to catch state restoration
4 | errors early when running debug builds.
5 |
6 | State restoration doesn't happen very often, but is nevertheless a very
7 | important topic to support.
8 | And since this doesn't happen often, especially during short-lived debug
9 | builds, programmer errors made here are often overlooked.
10 |
11 | By simply including `com.nhaarman.acorn.ext:acorn-android-statechecks`
12 | in your debug builds, a hook is registered and a StateChecker will try
13 | to save and restore the entire Navigator state upon each Scene
14 | transition.
15 | Restoration checking is done by creating a new Navigator from the saved
16 | state and immediately destroying it.
17 | The Navigator will never reach its 'started' state.
18 |
19 | **Note**: Instantiating the Navigator _may_ cause side effects if your
20 | Navigator or one of its Scenes does work outside of the 'started' state.
21 |
22 | To include this artifact, add the following to your `dependencies`
23 | section:
24 |
25 | ```groovy
26 | debugImplementation "com.nhaarman.acorn.ext:acorn-android-statechecks:x.x.x"
27 | ```
28 |
29 | Be careful to not include this artifact in production builds!
30 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-statechecks/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-statechecks/src/main/java/com/nhaarman/acorn/android/experimental/statechecks/ExperimentalStateChecker.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.experimental.statechecks
18 |
19 | /**
20 | * Marks all [StateChecker] declarations as an experimental API to
21 | * indicate that it is still experimental.
22 | *
23 | * The StateChecker has no backward compatibility guarantees
24 | * whatsoever.
25 | */
26 | @RequiresOptIn
27 | @Target(AnnotationTarget.CLASS)
28 | @Retention(AnnotationRetention.BINARY)
29 | annotation class ExperimentalStateChecker
30 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-statechecks/src/main/java/com/nhaarman/acorn/android/experimental/statechecks/StateRestorationFailedException.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.experimental.statechecks
18 |
19 | import com.nhaarman.acorn.state.SavedState
20 |
21 | @ExperimentalStateChecker
22 | internal class StateRestorationFailedException(
23 | private val state: SavedState?,
24 | cause: Throwable,
25 | ) : Exception(cause) {
26 |
27 | override val message: String?
28 | get() = "Could not restore state:\n\n\t$state\n\n See cause below."
29 | }
30 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-statechecks/src/main/java/com/nhaarman/acorn/android/experimental/statechecks/StateSavingFailedException.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.experimental.statechecks
18 |
19 | @ExperimentalStateChecker
20 | internal class StateSavingFailedException(
21 | cause: Throwable? = null,
22 | ) : Exception(cause) {
23 |
24 | override val message: String?
25 | get() = "Could not save instance state for Navigator (see cause below)."
26 | }
27 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-testing/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.android.library")
3 | id("kotlin-android")
4 |
5 | id("digital.wup.android-maven-publish")
6 | id("signing")
7 | }
8 |
9 | java {
10 | sourceCompatibility = JavaVersion.VERSION_17
11 | targetCompatibility = JavaVersion.VERSION_17
12 | }
13 |
14 | android {
15 | kotlinOptions {
16 | jvmTarget = "17"
17 | }
18 |
19 | compileOptions {
20 | sourceCompatibility JavaVersion.VERSION_17
21 | targetCompatibility JavaVersion.VERSION_17
22 | }
23 |
24 | defaultConfig {
25 | minSdkVersion(21)
26 | }
27 | namespace "com.nhaarman.acorn.android.tests"
28 | }
29 |
30 | dependencies {
31 | api project(":ext-acorn-android")
32 |
33 |
34 | compileOnly "androidx.test:rules"
35 | }
36 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-testing/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn.ext
2 | artifactId=acorn-android-testing
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-testing/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-testing/src/main/java/com/nhaarman/acorn/android/tests/AcornTestActivity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.tests
18 |
19 | import android.app.Activity
20 |
21 | class AcornTestActivity : Activity()
22 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-timber/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.android.library")
3 | id("kotlin-android")
4 |
5 | id("digital.wup.android-maven-publish")
6 | id("signing")
7 | }
8 |
9 | java {
10 | sourceCompatibility = JavaVersion.VERSION_17
11 | targetCompatibility = JavaVersion.VERSION_17
12 | }
13 |
14 | android {
15 | kotlinOptions {
16 | jvmTarget = "17"
17 | }
18 |
19 | compileOptions {
20 | sourceCompatibility JavaVersion.VERSION_17
21 | targetCompatibility JavaVersion.VERSION_17
22 | }
23 |
24 | defaultConfig {
25 | minSdkVersion(21)
26 | }
27 | namespace "com.nhaarman.acorn.android.timber"
28 | }
29 |
30 | dependencies {
31 | api project(":ext-acorn")
32 |
33 |
34 | implementation "com.jakewharton.timber:timber"
35 | }
36 |
--------------------------------------------------------------------------------
/ext/acorn-android/acorn-android-timber/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn.ext
2 | artifactId=acorn-android-timber
--------------------------------------------------------------------------------
/ext/acorn-android/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn.ext
2 | artifactId=acorn-android
--------------------------------------------------------------------------------
/ext/acorn-android/src/androidTest/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/androidTest/java/com/nhaarman/acorn/android/LinearLayoutContainer.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android
18 |
19 | import android.content.Context
20 | import android.util.AttributeSet
21 | import android.widget.LinearLayout
22 | import com.nhaarman.acorn.presentation.Container
23 |
24 | class LinearLayoutContainer @JvmOverloads constructor(
25 | context: Context,
26 | attrs: AttributeSet? = null,
27 | defStyleAttr: Int = 0,
28 | ) : LinearLayout(context, attrs, defStyleAttr), Container
29 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/androidTest/java/com/nhaarman/acorn/android/TestActivity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android
18 |
19 | import android.app.Activity
20 |
21 | class TestActivity : Activity()
22 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/androidTest/res/drawable/ic_android_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/androidTest/res/layout/linearlayout.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/androidTest/res/layout/linearlayoutcontainer.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/androidTest/res/values/styles_transitiontest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
9 |
10 |
13 |
14 |
17 |
18 |
21 |
22 | #fff
23 | #123456
24 |
25 |
26 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/main/java/com/nhaarman/acorn/android/dispatching/SceneDispatcherFactory.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.dispatching
18 |
19 | import com.nhaarman.acorn.state.SavedState
20 |
21 | typealias SceneDispatcherFactory = (savedState: SavedState?) -> SceneDispatcher
22 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/main/java/com/nhaarman/acorn/android/experimental/ExperimentalAcornEvents.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.experimental
18 |
19 | /**
20 | * Marks all [AcornEvents] declarations as an experimental API to
21 | * indicate that it is still experimental.
22 | *
23 | * The AcornEvents class has no backward compatibility guarantees
24 | * whatsoever.
25 | */
26 | @RequiresOptIn
27 | @Target(AnnotationTarget.CLASS)
28 | @Retention(AnnotationRetention.BINARY)
29 | annotation class ExperimentalAcornEvents
30 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/main/java/com/nhaarman/acorn/android/internal/Logging.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.internal
18 |
19 | import com.nhaarman.acorn.logger
20 |
21 | internal fun v(tag: String, message: Any?) = logger?.v(tag, message)
22 | internal fun d(tag: String, message: Any?) = logger?.d(tag, message)
23 | internal fun i(tag: String, message: Any?) = logger?.i(tag, message)
24 | internal fun w(tag: String, message: Any?) = logger?.w(tag, message)
25 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/main/java/com/nhaarman/acorn/android/transition/internal/TransitionCreationFailure.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.transition.internal
18 |
19 | import com.nhaarman.acorn.presentation.Scene
20 |
21 | internal class TransitionCreationFailure(
22 | private val previousScene: Scene<*>,
23 | private val newScene: Scene<*>,
24 | ) : RuntimeException() {
25 |
26 | override val message: String?
27 | get() = "Could not create transition from $previousScene to $newScene."
28 | }
29 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/main/java/com/nhaarman/acorn/android/uistate/internal/Destination.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.uistate.internal
18 |
19 | import com.nhaarman.acorn.android.presentation.ViewControllerFactory
20 | import com.nhaarman.acorn.navigation.TransitionData
21 | import com.nhaarman.acorn.presentation.Scene
22 |
23 | internal class Destination(
24 | val scene: Scene<*>,
25 | val viewControllerFactory: ViewControllerFactory,
26 | val transitionData: TransitionData?,
27 | ) {
28 |
29 | override fun toString(): String {
30 | return "Destination($scene, data=$transitionData)"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/main/java/com/nhaarman/acorn/android/util/View.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.util
18 |
19 | import android.os.Parcelable
20 | import android.util.SparseArray
21 | import android.view.View
22 |
23 | fun View.saveHierarchyState() = SparseArray().apply { saveHierarchyState(this) }
24 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 4dp
5 |
6 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/test/java/com/nhaarman/acorn/android/util/RootViewGroup.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.util
18 |
19 | import android.view.View
20 | import android.view.ViewGroup
21 |
22 | open class RootViewGroup : ViewGroup(null) {
23 |
24 | var views = emptyList()
25 | private set
26 |
27 | override fun addView(child: View) {
28 | views += child
29 | }
30 |
31 | override fun removeAllViews() {
32 | views = emptyList()
33 | }
34 |
35 | override fun onLayout(changed: Boolean, l: Int, t: Int, r: Int, b: Int) {
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/test/java/com/nhaarman/acorn/android/util/TestScene.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.util
18 |
19 | import com.nhaarman.acorn.presentation.Container
20 | import com.nhaarman.acorn.presentation.Scene
21 | import com.nhaarman.acorn.presentation.SceneKey
22 |
23 | open class TestScene(
24 | sceneKey: SceneKey? = null,
25 | ) : Scene {
26 |
27 | override val key: SceneKey = sceneKey ?: super.key
28 |
29 | companion object {
30 |
31 | fun withKey(key: String): TestScene {
32 | return TestScene(SceneKey(key))
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/test/java/com/nhaarman/acorn/android/util/TestView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.util
18 |
19 | import android.view.View
20 |
21 | class TestView : View(null)
22 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/test/java/com/nhaarman/acorn/android/util/TestViewController.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.android.util
18 |
19 | import android.view.View
20 | import com.nhaarman.acorn.OnBackPressListener
21 | import com.nhaarman.acorn.android.presentation.ViewController
22 |
23 | class TestViewController(
24 | override val view: View,
25 | ) : ViewController, OnBackPressListener {
26 |
27 | override fun onBackPressed(): Boolean {
28 | return false
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/ext/acorn-android/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker:
--------------------------------------------------------------------------------
1 | mock-maker-inline
--------------------------------------------------------------------------------
/ext/acorn/acorn-experimental/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.jetbrains.kotlin.jvm")
3 |
4 | id("org.gradle.maven-publish")
5 | id("signing")
6 | }
7 |
8 | java {
9 | sourceCompatibility = JavaVersion.VERSION_17
10 | targetCompatibility = JavaVersion.VERSION_17
11 | }
12 |
13 | compileKotlin {
14 | kotlinOptions {
15 | jvmTarget = "17"
16 | }
17 | }
18 |
19 | dependencies {
20 | api project(":acorn")
21 | api project(":ext-acorn")
22 |
23 |
24 | compileOnly "androidx.annotation:annotation"
25 |
26 | testImplementation "com.nhaarman:expect.kt"
27 | testImplementation "org.mockito.kotlin:mockito-kotlin"
28 | testImplementation "org.junit.jupiter:junit-jupiter-api"
29 | testImplementation "org.junit.jupiter:junit-jupiter-engine"
30 | }
31 |
--------------------------------------------------------------------------------
/ext/acorn/acorn-experimental/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn.ext
2 | artifactId=acorn-experimental
3 |
--------------------------------------------------------------------------------
/ext/acorn/acorn-experimental/src/main/java/com/nhaarman/acorn/navigation/experimental/ExperimentalCompositeParallelNavigator.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.navigation.experimental
18 |
19 | /**
20 | * Marks all [CompositeParallelNavigator] declarations as an experimental API to
21 | * indicate that it is still experimental.
22 | *
23 | * The CompositeParallelNavigator has no backward compatibility guarantees
24 | * whatsoever.
25 | */
26 | @RequiresOptIn
27 | @Target(AnnotationTarget.CLASS)
28 | @Retention(AnnotationRetention.BINARY)
29 | annotation class ExperimentalCompositeParallelNavigator
30 |
--------------------------------------------------------------------------------
/ext/acorn/acorn-experimental/src/main/java/com/nhaarman/acorn/navigation/experimental/ExperimentalConcurrentPairNavigator.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.navigation.experimental
18 |
19 | /**
20 | * Marks all [ConcurrentPairNavigator] declarations as an experimental API to
21 | * indicate that it is still experimental.
22 | *
23 | * The ConcurrentPairNavigator has no backward compatibility guarantees
24 | * whatsoever.
25 | */
26 | @RequiresOptIn
27 | @Target(AnnotationTarget.CLASS)
28 | @Retention(AnnotationRetention.BINARY)
29 | annotation class ExperimentalConcurrentPairNavigator
30 |
--------------------------------------------------------------------------------
/ext/acorn/acorn-experimental/src/main/java/com/nhaarman/acorn/navigation/experimental/internal/Logging.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.navigation.experimental.internal
18 |
19 | import com.nhaarman.acorn.logger
20 |
21 | internal fun v(tag: String, message: Any?) = logger?.v(tag, message)
22 | internal fun d(tag: String, message: Any?) = logger?.d(tag, message)
23 | internal fun i(tag: String, message: Any?) = logger?.i(tag, message)
24 | internal fun w(tag: String, message: Any?) = logger?.w(tag, message)
25 |
--------------------------------------------------------------------------------
/ext/acorn/acorn-rx/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.jetbrains.kotlin.jvm")
3 |
4 | id("org.gradle.maven-publish")
5 | id("signing")
6 | }
7 |
8 | java {
9 | sourceCompatibility = JavaVersion.VERSION_17
10 | targetCompatibility = JavaVersion.VERSION_17
11 | }
12 |
13 | compileKotlin {
14 | kotlinOptions {
15 | jvmTarget = "17"
16 | }
17 | }
18 |
19 | dependencies {
20 | api project(':ext-acorn')
21 |
22 | api "io.reactivex.rxjava2:rxjava"
23 |
24 | implementation "io.reactivex.rxjava2:rxkotlin"
25 |
26 | compileOnly "androidx.annotation:annotation"
27 |
28 | testImplementation "com.nhaarman:expect.kt"
29 | testImplementation "org.mockito.kotlin:mockito-kotlin"
30 | testImplementation "org.junit.jupiter:junit-jupiter-api"
31 | testImplementation "org.junit.jupiter:junit-jupiter-engine"
32 | }
33 |
--------------------------------------------------------------------------------
/ext/acorn/acorn-rx/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn.ext
2 | artifactId=acorn-rx
--------------------------------------------------------------------------------
/ext/acorn/acorn-rx/src/main/java/com/nhaarman/acorn/Option.kt:
--------------------------------------------------------------------------------
1 | package com.nhaarman.acorn
2 |
3 | fun T?.toOption(): Option = this?.let { Some(it) } ?: None
4 |
5 | fun Option.orNull(): T? = when (this) {
6 | is Some -> value
7 | is None -> null
8 | }
9 |
10 | sealed class Option {
11 |
12 | companion object {
13 |
14 | fun empty(): Option = None
15 |
16 | fun just(value: T): Option = Some(value)
17 | }
18 | }
19 |
20 | object None : Option()
21 | data class Some(val value: T) : Option()
22 |
--------------------------------------------------------------------------------
/ext/acorn/acorn-rx/src/main/java/com/nhaarman/acorn/navigation/DisposableHandle.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.navigation
18 |
19 | import io.reactivex.disposables.Disposable
20 |
21 | /**
22 | * Wraps the receiving [DisposableHandle] as a [Disposable].
23 | */
24 | fun DisposableHandle.asDisposable() = object : Disposable {
25 | override fun isDisposed(): Boolean {
26 | return this@asDisposable.isDisposed()
27 | }
28 |
29 | override fun dispose() {
30 | this@asDisposable.dispose()
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/ext/acorn/acorn-testing/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.jetbrains.kotlin.jvm")
3 |
4 | id("org.gradle.maven-publish")
5 | id("signing")
6 | }
7 |
8 | java {
9 | sourceCompatibility = JavaVersion.VERSION_17
10 | targetCompatibility = JavaVersion.VERSION_17
11 | }
12 |
13 | compileKotlin {
14 | kotlinOptions {
15 | jvmTarget = "17"
16 | }
17 | }
18 |
19 | dependencies {
20 | api project(':ext-acorn')
21 |
22 | compileOnly "androidx.annotation:annotation"
23 | }
24 |
--------------------------------------------------------------------------------
/ext/acorn/acorn-testing/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn.ext
2 | artifactId=acorn-testing
--------------------------------------------------------------------------------
/ext/acorn/acorn-testing/src/main/java/com/nhaarman/acorn/testing/ContainerProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.testing
18 |
19 | import com.nhaarman.acorn.presentation.Container
20 | import com.nhaarman.acorn.presentation.Scene
21 |
22 | /**
23 | * An interface that can provide [Container] instances for [Scene]s when working
24 | * with [TestContext].
25 | */
26 | interface ContainerProvider {
27 |
28 | fun containerFor(scene: Scene<*>): Container
29 | }
30 |
--------------------------------------------------------------------------------
/ext/acorn/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.jetbrains.kotlin.jvm")
3 | id("org.gradle.java-library")
4 |
5 | id("org.gradle.maven-publish")
6 | id("signing")
7 | }
8 |
9 | java {
10 | sourceCompatibility = JavaVersion.VERSION_17
11 | targetCompatibility = JavaVersion.VERSION_17
12 | }
13 |
14 | compileKotlin {
15 | kotlinOptions {
16 | jvmTarget = "17"
17 | }
18 | }
19 |
20 | dependencies {
21 | api project(":acorn")
22 |
23 |
24 | compileOnly "androidx.annotation:annotation"
25 |
26 | testImplementation "com.nhaarman:expect.kt"
27 | testImplementation "org.mockito.kotlin:mockito-kotlin"
28 | testImplementation "org.junit.jupiter:junit-jupiter-api"
29 | testImplementation "org.junit.jupiter:junit-jupiter-engine"
30 | }
31 |
--------------------------------------------------------------------------------
/ext/acorn/gradle.properties:
--------------------------------------------------------------------------------
1 | groupId=com.nhaarman.acorn.ext
2 | artifactId=acorn
--------------------------------------------------------------------------------
/ext/acorn/integrationtests/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.jetbrains.kotlin.jvm")
3 | }
4 |
5 | java {
6 | sourceCompatibility = JavaVersion.VERSION_17
7 | targetCompatibility = JavaVersion.VERSION_17
8 | }
9 |
10 | compileKotlin {
11 | kotlinOptions {
12 | jvmTarget = "17"
13 | }
14 | }
15 |
16 | dependencies {
17 | testImplementation project(":ext-acorn-testing")
18 | testImplementation "com.nhaarman:expect.kt"
19 | testImplementation "org.mockito.kotlin:mockito-kotlin"
20 | testImplementation "org.junit.jupiter:junit-jupiter-api"
21 | testImplementation "org.junit.jupiter:junit-jupiter-engine"
22 | }
23 |
--------------------------------------------------------------------------------
/ext/acorn/src/main/java/acorn/Log.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package acorn
18 |
19 | import com.nhaarman.acorn.Logger
20 |
21 | /**
22 | * The logger instance Acorn uses to log statements, an alias for [com.nhaarman.acorn.logger].
23 | *
24 | * @see com.nhaarman.acorn.logger
25 | */
26 | var logger: Logger?
27 | inline get() = com.nhaarman.acorn.logger
28 | inline set(value) {
29 | com.nhaarman.acorn.logger = value
30 | }
31 |
--------------------------------------------------------------------------------
/ext/acorn/src/main/java/com/nhaarman/acorn/OnBackPressListener.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn
18 |
19 | import com.nhaarman.acorn.navigation.Navigator
20 |
21 | /**
22 | * An interface [Navigator]s can implement to indicate they are interested in back
23 | * button presses.
24 | */
25 | interface OnBackPressListener {
26 |
27 | /**
28 | * Invoked when the user presses the back button.
29 | *
30 | * @return `true` if the back press is handled by the implementation,
31 | * `false` otherwise.
32 | */
33 | fun onBackPressed(): Boolean
34 | }
35 |
--------------------------------------------------------------------------------
/ext/acorn/src/main/java/com/nhaarman/acorn/internal/Logging.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.internal
18 |
19 | import com.nhaarman.acorn.logger
20 |
21 | internal fun v(tag: String, message: Any?) = logger?.v(tag, message)
22 | internal fun d(tag: String, message: Any?) = logger?.d(tag, message)
23 | internal fun i(tag: String, message: Any?) = logger?.i(tag, message)
24 | internal fun w(tag: String, message: Any?) = logger?.w(tag, message)
25 |
--------------------------------------------------------------------------------
/ext/acorn/src/test/java/com/nhaarman/acorn/navigation/TestScene.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.navigation
18 |
19 | import com.nhaarman.acorn.presentation.Container
20 | import com.nhaarman.acorn.presentation.Scene
21 |
22 | open class TestScene(var foo: Int) : Scene
23 |
--------------------------------------------------------------------------------
/ext/acorn/src/test/resources/META-INF/services/org.junit.jupiter.api.extension.Extension:
--------------------------------------------------------------------------------
1 | com.nhaarman.acorn.TestLoggerExtension
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | android.enableJetifier=true
2 | android.useAndroidX=true
3 |
4 | org.gradle.jvmargs=-Xmx4g
5 | org.gradle.caching=true
6 | org.gradle.parallel=true
7 | org.gradle.configureondemand=true
8 |
9 | kotlin.parallel.tasks.in.project=true
10 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
4 | networkTimeout=10000
5 | zipStoreBase=GRADLE_USER_HOME
6 | zipStorePath=wrapper/dists
7 |
--------------------------------------------------------------------------------
/releasing.md:
--------------------------------------------------------------------------------
1 | # Releasing
2 |
3 | To push a release to Maven Central:
4 |
5 | - Tag the commit as a release: `git tag -a x.x.x -m x.x.x`
6 | - Push the tags: `git push --tags`
7 | - Execute `./gradlew publish`
8 | - Head over to `https://oss.sonatype.org/#stagingRepositories` and close and release the repository.
9 |
10 | - Execute `./gradlew orchidDeploy` to deploy the documentation website;
11 | - `./gradlew orchidDeploy -PversionName=1.0.0` to force the version name.
12 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/java/com/nhaarman/acorn/samples/hellobottombar/DestinationSelectedListener.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellobottombar
18 |
19 | interface DestinationSelectedListener {
20 |
21 | fun onDestinationSelected(destination: MyDestination)
22 | }
23 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/java/com/nhaarman/acorn/samples/hellobottombar/HelloBottomBarNavigatorProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellobottombar
18 |
19 | import com.nhaarman.acorn.android.navigation.AbstractNavigatorProvider
20 | import com.nhaarman.acorn.state.NavigatorState
21 |
22 | object HelloBottomBarNavigatorProvider : AbstractNavigatorProvider() {
23 |
24 | override fun createNavigator(savedState: NavigatorState?): HelloBottomBarNavigator {
25 | return HelloBottomBarNavigator(savedState)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/java/com/nhaarman/acorn/samples/hellobottombar/MyApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellobottombar
18 |
19 | import android.app.Application
20 | import com.nhaarman.acorn.android.AndroidLogger
21 |
22 | class MyApplication : Application() {
23 |
24 | override fun onCreate() {
25 | acorn.logger = AndroidLogger()
26 | super.onCreate()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/java/com/nhaarman/acorn/samples/hellobottombar/MyDestination.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellobottombar
18 |
19 | enum class MyDestination {
20 | Favorites,
21 | Music,
22 | Places,
23 | News,
24 | }
25 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/color/menu_foreground.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/drawable/ic_favorite_white_196dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/drawable/ic_music_white_196dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/drawable/ic_news_white_196dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/drawable/ic_place_white_196p.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/layout/favorites_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/layout/news_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/layout/places_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
20 |
21 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/menu/menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #fff
5 |
6 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Favorites
5 | Music
6 | Places
7 | News
8 |
9 | Push nested stack
10 | Press the back button to pop the nested stack.\nWhen the nested stack is empty, the Navigator in this tab will finish.
11 |
12 |
--------------------------------------------------------------------------------
/samples/hello-bottombar/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/samples/hello-concurrentpairnavigator/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-concurrentpairnavigator/src/main/java/com/nhaarman/acorn/samples/helloconcurrentpairnavigator/HelloConcurrentPairNavigatorProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.helloconcurrentpairnavigator
18 |
19 | import com.nhaarman.acorn.android.navigation.AbstractNavigatorProvider
20 | import com.nhaarman.acorn.state.NavigatorState
21 |
22 | object HelloConcurrentPairNavigatorProvider : AbstractNavigatorProvider() {
23 |
24 | override fun createNavigator(savedState: NavigatorState?): HelloConcurrentPairNavigator {
25 | return HelloConcurrentPairNavigator()
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-concurrentpairnavigator/src/main/java/com/nhaarman/acorn/samples/helloconcurrentpairnavigator/MyApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.helloconcurrentpairnavigator
18 |
19 | import android.app.Application
20 | import com.nhaarman.acorn.android.AndroidLogger
21 |
22 | class MyApplication : Application() {
23 |
24 | override fun onCreate() {
25 | acorn.logger = AndroidLogger()
26 | super.onCreate()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/samples/hello-concurrentpairnavigator/src/main/res/layout/first_and_second_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/samples/hello-concurrentpairnavigator/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello, first Scene!
5 | Second Scene
6 |
7 | Hello, second Scene!
8 | First Scene
9 |
10 |
--------------------------------------------------------------------------------
/samples/hello-concurrentpairnavigator/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/samples/hello-navigation/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-navigation/src/main/java/com/nhaarman/acorn/samples/hellonavigation/HelloNavigationNavigatorProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellonavigation
18 |
19 | import com.nhaarman.acorn.android.navigation.AbstractNavigatorProvider
20 | import com.nhaarman.acorn.state.NavigatorState
21 |
22 | object HelloNavigationNavigatorProvider : AbstractNavigatorProvider() {
23 |
24 | override fun createNavigator(savedState: NavigatorState?): HelloNavigationNavigator {
25 | return HelloNavigationNavigator()
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-navigation/src/main/java/com/nhaarman/acorn/samples/hellonavigation/MainActivity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellonavigation
18 |
19 | import com.nhaarman.acorn.android.AcornAppCompatActivity
20 | import com.nhaarman.acorn.android.navigation.NavigatorProvider
21 |
22 | class MainActivity : AcornAppCompatActivity() {
23 |
24 | override fun provideNavigatorProvider(): NavigatorProvider {
25 | return HelloNavigationNavigatorProvider
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-navigation/src/main/java/com/nhaarman/acorn/samples/hellonavigation/MyApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellonavigation
18 |
19 | import android.app.Application
20 | import com.nhaarman.acorn.android.AndroidLogger
21 |
22 | class MyApplication : Application() {
23 |
24 | override fun onCreate() {
25 | acorn.logger = AndroidLogger()
26 | super.onCreate()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/samples/hello-navigation/src/main/res/layout/first_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-navigation/src/main/res/layout/second_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-navigation/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello, first Scene!
5 | Second Scene
6 |
7 | Hello, second Scene!
8 | First Scene
9 |
10 |
--------------------------------------------------------------------------------
/samples/hello-navigation/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/samples/hello-overridingback/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-overridingback/src/main/java/com/nhaarman/acorn/samples/hellooverridingback/HelloOverridingBackNavigator.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellooverridingback
18 |
19 | import com.nhaarman.acorn.navigation.SingleSceneNavigator
20 | import com.nhaarman.acorn.presentation.Container
21 | import com.nhaarman.acorn.presentation.Scene
22 | import com.nhaarman.acorn.state.SceneState
23 |
24 | class HelloOverridingBackNavigator : SingleSceneNavigator(null) {
25 |
26 | override fun createScene(state: SceneState?): Scene {
27 | return FirstScene()
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/samples/hello-overridingback/src/main/java/com/nhaarman/acorn/samples/hellooverridingback/HelloOverridingBackNavigatorProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellooverridingback
18 |
19 | import com.nhaarman.acorn.android.navigation.AbstractNavigatorProvider
20 | import com.nhaarman.acorn.state.NavigatorState
21 |
22 | object HelloOverridingBackNavigatorProvider : AbstractNavigatorProvider() {
23 |
24 | override fun createNavigator(savedState: NavigatorState?): HelloOverridingBackNavigator {
25 | return HelloOverridingBackNavigator()
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-overridingback/src/main/java/com/nhaarman/acorn/samples/hellooverridingback/MainActivity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellooverridingback
18 |
19 | import com.nhaarman.acorn.android.AcornActivity
20 | import com.nhaarman.acorn.android.navigation.NavigatorProvider
21 |
22 | class MainActivity : AcornActivity() {
23 |
24 | override fun provideNavigatorProvider(): NavigatorProvider {
25 | return HelloOverridingBackNavigatorProvider
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-overridingback/src/main/java/com/nhaarman/acorn/samples/hellooverridingback/MyApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellooverridingback
18 |
19 | import android.app.Application
20 | import com.nhaarman.acorn.android.AndroidLogger
21 |
22 | class MyApplication : Application() {
23 |
24 | override fun onCreate() {
25 | acorn.logger = AndroidLogger()
26 | super.onCreate()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/samples/hello-overridingback/src/main/res/layout/first_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
13 |
14 |
23 |
24 |
28 |
29 |
--------------------------------------------------------------------------------
/samples/hello-overridingback/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Press the back button!
5 |
6 |
--------------------------------------------------------------------------------
/samples/hello-overridingback/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/samples/hello-sharedata/src/main/java/com/nhaarman/acorn/samples/hellosharedata/pictures/Picture.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellosharedata.pictures
18 |
19 | import java.io.File
20 |
21 | data class Picture(
22 | val file: File,
23 | )
24 |
--------------------------------------------------------------------------------
/samples/hello-sharedata/src/main/res/drawable/ic_arrow_back_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/hello-sharedata/src/main/res/layout/picturedetail_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
16 |
17 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/samples/hello-sharedata/src/main/res/layout/picturegallery_picture.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/samples/hello-sharedata/src/main/res/layout/picturegallery_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/samples/hello-sharedata/src/main/res/menu/pickpicture.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/samples/hello-sharedata/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello, share data!
5 | Pick
6 |
7 |
--------------------------------------------------------------------------------
/samples/hello-sharedata/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
12 |
13 |
--------------------------------------------------------------------------------
/samples/hello-startactivity/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-startactivity/src/main/java/com/nhaarman/acorn/samples/hellostartactivity/HelloStartActivityNavigatorProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellostartactivity
18 |
19 | import com.nhaarman.acorn.android.navigation.AbstractNavigatorProvider
20 | import com.nhaarman.acorn.state.NavigatorState
21 |
22 | object HelloStartActivityNavigatorProvider : AbstractNavigatorProvider() {
23 |
24 | override fun createNavigator(savedState: NavigatorState?): HelloStartActivityNavigator {
25 | return HelloStartActivityNavigator(savedState)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-startactivity/src/main/java/com/nhaarman/acorn/samples/hellostartactivity/MyApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellostartactivity
18 |
19 | import android.app.Application
20 | import com.nhaarman.acorn.android.AndroidLogger
21 |
22 | class MyApplication : Application() {
23 |
24 | override fun onCreate() {
25 | acorn.logger = AndroidLogger()
26 | super.onCreate()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/samples/hello-startactivity/src/main/res/layout/first_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-startactivity/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello!
5 | OPEN SETTINGS
6 |
7 |
--------------------------------------------------------------------------------
/samples/hello-startactivity/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/samples/hello-staterestoration/art/hello_staterestoration.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/samples/hello-staterestoration/art/hello_staterestoration.png
--------------------------------------------------------------------------------
/samples/hello-staterestoration/readme.md:
--------------------------------------------------------------------------------
1 | Hello, state restoration!
2 | =========================
3 |
4 | This module contains a sample application which shows how you can save and restore
5 | various states in Acorn.
6 | The application allows you to click through several Scenes, each next Scene adding
7 | to a counter.
8 | In addition, each Scene contains an EditText to demonstrate view state saving as
9 | well.
10 |
11 | 
12 |
13 | The interesting components in the application:
14 |
15 | - `HelloStateRestorationContainer` and `HelloStateRestorationViewController`
16 |
17 | These are the interface and Android View implementation that will be drawn on
18 | screen. The ViewController implements `RestorableViewController` which allows
19 | for saving its hierarchy state automatically.
20 |
21 | - `HelloStateRestorationScene`
22 |
23 | This is the Scene implementation that interacts with the
24 | `HelloStateRestorationContainer`, and saves both its own and the Container's
25 | state.
26 |
27 | - `HelloStateRestorationNavigator`
28 |
29 | This is a `StackNavigator` implementation that pushes and pops Scenes on and
30 | off the stack, and keeps a counter for them.
31 | This Navigator can save and restore both its own state and the full states of
32 | all its Scenes.
33 |
--------------------------------------------------------------------------------
/samples/hello-staterestoration/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-staterestoration/src/main/java/com/nhaarman/acorn/samples/hellostaterestoration/HelloStateRestorationNavigatorProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellostaterestoration
18 |
19 | import com.nhaarman.acorn.android.navigation.AbstractNavigatorProvider
20 | import com.nhaarman.acorn.state.NavigatorState
21 |
22 | object HelloStateRestorationNavigatorProvider : AbstractNavigatorProvider() {
23 |
24 | override fun createNavigator(savedState: NavigatorState?): HelloStateRestorationNavigator {
25 | return HelloStateRestorationNavigator.create(savedState)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-staterestoration/src/main/java/com/nhaarman/acorn/samples/hellostaterestoration/MainActivity.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellostaterestoration
18 |
19 | import com.nhaarman.acorn.android.AcornActivity
20 | import com.nhaarman.acorn.android.navigation.NavigatorProvider
21 |
22 | class MainActivity : AcornActivity() {
23 |
24 | override fun provideNavigatorProvider(): NavigatorProvider {
25 | return HelloStateRestorationNavigatorProvider
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-staterestoration/src/main/java/com/nhaarman/acorn/samples/hellostaterestoration/MyApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellostaterestoration
18 |
19 | import android.app.Application
20 | import com.nhaarman.acorn.android.AndroidLogger
21 |
22 | class MyApplication : Application() {
23 |
24 | override fun onCreate() {
25 | acorn.logger = AndroidLogger()
26 | super.onCreate()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/samples/hello-staterestoration/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Type some text
4 | Next
5 |
--------------------------------------------------------------------------------
/samples/hello-staterestoration/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/samples/hello-transitionanimation/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-transitionanimation/src/main/java/com/nhaarman/acorn/samples/hellotransitionanimation/HelloTransitionAnimationNavigatorProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellotransitionanimation
18 |
19 | import com.nhaarman.acorn.android.navigation.AbstractNavigatorProvider
20 | import com.nhaarman.acorn.state.NavigatorState
21 |
22 | object HelloTransitionAnimationNavigatorProvider : AbstractNavigatorProvider() {
23 |
24 | override fun createNavigator(savedState: NavigatorState?): HelloTransitionAnimationNavigator {
25 | return HelloTransitionAnimationNavigator()
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-transitionanimation/src/main/java/com/nhaarman/acorn/samples/hellotransitionanimation/MyApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.hellotransitionanimation
18 |
19 | import android.app.Application
20 | import com.nhaarman.acorn.android.AndroidLogger
21 |
22 | class MyApplication : Application() {
23 |
24 | override fun onCreate() {
25 | acorn.logger = AndroidLogger()
26 | super.onCreate()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/samples/hello-transitionanimation/src/main/res/layout/first_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/samples/hello-transitionanimation/src/main/res/layout/second_scene.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
12 |
13 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/samples/hello-transitionanimation/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Hello, first Scene!
5 | Second Scene
6 |
7 | Hello, second Scene!
8 | First Scene
9 |
10 |
--------------------------------------------------------------------------------
/samples/hello-transitionanimation/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
--------------------------------------------------------------------------------
/samples/hello-viewfactory/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.android.application")
3 | id("kotlin-android")
4 | }
5 |
6 | android {
7 | defaultConfig {
8 | minSdkVersion(23)
9 | }
10 |
11 | namespace "com.nhaarman.acorn.samples.helloviewfactory"
12 | }
13 |
14 | dependencies {
15 | implementation project(":ext-acorn-android-appcompat")
16 |
17 |
18 | implementation "com.google.android.material:material"
19 | implementation "androidx.constraintlayout:constraintlayout"
20 | implementation "androidx.appcompat:appcompat"
21 |
22 | testImplementation "com.nhaarman:expect.kt"
23 | testImplementation "org.mockito.kotlin:mockito-kotlin"
24 | testImplementation "org.junit.jupiter:junit-jupiter-api"
25 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
26 |
27 | debugImplementation project(":ext-acorn-android-testing")
28 | androidTestImplementation "junit:junit"
29 | androidTestImplementation "com.nhaarman:expect.kt"
30 | androidTestImplementation "androidx.test.espresso:espresso-core"
31 | androidTestImplementation "androidx.test.espresso:espresso-contrib"
32 | androidTestImplementation "androidx.test:runner"
33 | androidTestImplementation "androidx.test:rules"
34 | }
35 |
--------------------------------------------------------------------------------
/samples/hello-viewfactory/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/samples/hello-viewfactory/src/main/java/com/nhaarman/acorn/samples/helloviewfactory/HelloViewFactoryContainer.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.helloviewfactory
18 |
19 | import android.view.View
20 | import com.nhaarman.acorn.android.presentation.ViewController
21 | import com.nhaarman.acorn.presentation.Container
22 |
23 | /**
24 | * An interface describing the view.
25 | */
26 | interface HelloViewFactoryContainer : Container
27 |
28 | /**
29 | * A [ViewController] implementation implementing the [HelloViewFactoryContainer].
30 | */
31 | class HelloViewFactoryViewController(
32 | override val view: View,
33 | ) : HelloViewFactoryContainer, ViewController
34 |
--------------------------------------------------------------------------------
/samples/hello-viewfactory/src/main/java/com/nhaarman/acorn/samples/helloviewfactory/HelloViewFactoryNavigatorProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.helloviewfactory
18 |
19 | import com.nhaarman.acorn.android.navigation.AbstractNavigatorProvider
20 | import com.nhaarman.acorn.state.NavigatorState
21 |
22 | object HelloViewFactoryNavigatorProvider : AbstractNavigatorProvider() {
23 |
24 | override fun createNavigator(savedState: NavigatorState?): HelloViewFactoryNavigator {
25 | return HelloViewFactoryNavigator(savedState)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-viewfactory/src/main/java/com/nhaarman/acorn/samples/helloviewfactory/HelloViewFactoryScene.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.helloviewfactory
18 |
19 | import com.nhaarman.acorn.presentation.Scene
20 |
21 | class HelloViewFactoryScene : Scene
22 |
--------------------------------------------------------------------------------
/samples/hello-viewfactory/src/main/java/com/nhaarman/acorn/samples/helloviewfactory/MyApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.helloviewfactory
18 |
19 | import android.app.Application
20 | import com.nhaarman.acorn.android.AndroidLogger
21 |
22 | class MyApplication : Application() {
23 |
24 | override fun onCreate() {
25 | acorn.logger = AndroidLogger()
26 | super.onCreate()
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/samples/hello-viewfactory/src/main/res/layout/myscene.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/samples/hello-viewfactory/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello world!
4 |
--------------------------------------------------------------------------------
/samples/hello-viewfactory/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/samples/hello-world/art/hello_world.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/nhaarman/acorn/859121ce76cb5a6d2998bf978ea06adca5b00b24/samples/hello-world/art/hello_world.png
--------------------------------------------------------------------------------
/samples/hello-world/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.android.application")
3 | id("kotlin-android")
4 | }
5 |
6 | android {
7 | defaultConfig {
8 | minSdkVersion(21)
9 | }
10 | buildFeatures {
11 | viewBinding true
12 | }
13 |
14 | namespace "com.nhaarman.acorn.samples.helloworld"
15 | }
16 |
17 | dependencies {
18 | implementation project(":ext-acorn-android")
19 |
20 |
21 | implementation "com.google.android.material:material"
22 | implementation "androidx.constraintlayout:constraintlayout"
23 | implementation "androidx.appcompat:appcompat"
24 |
25 | implementation "com.jakewharton.timber:timber"
26 |
27 | testImplementation "com.nhaarman:expect.kt"
28 | testImplementation "org.junit.jupiter:junit-jupiter-api"
29 | testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine"
30 |
31 | debugImplementation project(":ext-acorn-android-testing")
32 | androidTestImplementation "junit:junit"
33 | androidTestImplementation "com.nhaarman:expect.kt"
34 | androidTestImplementation "androidx.test.espresso:espresso-core"
35 | androidTestImplementation "androidx.test.espresso:espresso-contrib"
36 | androidTestImplementation "androidx.test:runner"
37 | androidTestImplementation "androidx.test:rules"
38 | }
39 |
--------------------------------------------------------------------------------
/samples/hello-world/readme.md:
--------------------------------------------------------------------------------
1 | Hello, world!
2 | =============
3 |
4 | This module contains an "Hello, world!" example using Acorn, which shows a very simple `TextView` containing the text "Hello, world!".
5 |
6 | 
7 |
8 | The application consists of the following components:
9 |
10 | - `HelloWorldContainer` and `HelloWorldView`
11 |
12 | These are the interface and Android view implementation that will be drawn on screen.
13 | The `HelloWorldContainer` exposes a mutable property that can be modified to show a different text.
14 |
15 | - `HelloWorldScene`
16 |
17 | This is the `Scene` implementation that interacts with the `HelloWorldContainer` to show the "Hello, world!" text.
18 |
19 | - `HelloWorldNavigator`
20 |
21 | This is a very simple `Navigator` implementation that only hosts a single `HelloWorldScene`.
22 |
23 | - `MainActivity`
24 |
25 | The `MainActivity` listens to changes in the `Navigator` and inflates and attaches the layout to the scene.
26 | Using a `ViewControllerFactory` it binds the `HelloWorldScene` to the proper layout file.
27 |
28 |
--------------------------------------------------------------------------------
/samples/hello-world/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/samples/hello-world/src/main/java/com/nhaarman/acorn/samples/helloworld/HelloWorldNavigatorProvider.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.samples.helloworld
18 |
19 | import com.nhaarman.acorn.android.navigation.AbstractNavigatorProvider
20 | import com.nhaarman.acorn.state.NavigatorState
21 |
22 | object HelloWorldNavigatorProvider : AbstractNavigatorProvider() {
23 |
24 | override fun createNavigator(savedState: NavigatorState?): HelloWorldNavigator {
25 | return HelloWorldNavigator()
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/hello-world/src/main/res/layout/hello_world.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/samples/hello-world/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
10 |
11 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/java/com/nhaarman/acorn/notesapp/android/AndroidNotesAppComponent.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.notesapp.android
18 |
19 | import android.content.Context
20 | import com.nhaarman.acorn.notesapp.NotesAppComponent
21 | import com.nhaarman.acorn.notesapp.note.NoteItemsRepository
22 |
23 | class AndroidNotesAppComponent(
24 | private val context: Context,
25 | ) : NotesAppComponent {
26 |
27 | override val noteItemsRepository: NoteItemsRepository by lazy {
28 | MemoryNoteItemsRepository()
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/java/com/nhaarman/acorn/notesapp/android/internal/Logging.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.notesapp.android.internal
18 |
19 | import com.nhaarman.acorn.logger
20 |
21 | internal fun v(tag: String, message: Any?) = logger?.v(tag, message)
22 | internal fun d(tag: String, message: Any?) = logger?.d(tag, message)
23 | internal fun i(tag: String, message: Any?) = logger?.i(tag, message)
24 | internal fun w(tag: String, message: Any?) = logger?.w(tag, message)
25 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/java/com/nhaarman/acorn/notesapp/android/ui/transition/ClickedItemViewData.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.notesapp.android.ui.transition
18 |
19 | data class ClickedItemViewData(
20 | val clickedItemHeight: Int,
21 | val clickedItemY: Int,
22 | )
23 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/drawable/ic_add_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/drawable/ic_check_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/drawable/ic_delete_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/drawable/ic_delete_white_24dp.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/layout/itemlistcreateitem_reveal.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/menu/createitem_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/menu/edititem_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/values/createitem_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Create item
5 |
6 | Create
7 | Take a note
8 |
9 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/values/edititem_strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Edit item
5 |
6 | Save
7 | Delete
8 | @string/createitem_text_hint
9 |
10 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/values/notesapp_colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #008577
5 | #00574B
6 | #D81B60
7 |
8 |
9 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/values/notesapp_strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Notes - Acorn
3 |
4 |
--------------------------------------------------------------------------------
/samples/notes-app/android/src/main/res/values/notesapp_styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/notes-app/build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("org.jetbrains.kotlin.jvm")
3 | }
4 |
5 | dependencies {
6 | implementation project(":ext-acorn")
7 | implementation project(":ext-acorn-rx")
8 |
9 | api "io.reactivex.rxjava2:rxjava"
10 | implementation "io.reactivex.rxjava2:rxkotlin"
11 |
12 | testImplementation project(":ext-acorn-testing")
13 | testImplementation "org.junit.jupiter:junit-jupiter-api"
14 | testImplementation "org.mockito.kotlin:mockito-kotlin"
15 | testImplementation "com.nhaarman:expect.kt"
16 | testImplementation "org.junit.jupiter:junit-jupiter-engine"
17 | }
18 |
--------------------------------------------------------------------------------
/samples/notes-app/src/main/java/com/nhaarman/acorn/notesapp/MainThread.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.notesapp
18 |
19 | import io.reactivex.Scheduler
20 |
21 | /** The scheduler to use to schedule UI related things. */
22 | var mainThread: Scheduler? = null
23 |
--------------------------------------------------------------------------------
/samples/notes-app/src/main/java/com/nhaarman/acorn/notesapp/NotesAppComponent.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.notesapp
18 |
19 | import com.nhaarman.acorn.notesapp.note.NoteItemsRepository
20 |
21 | interface NotesAppComponent {
22 |
23 | val noteItemsRepository: NoteItemsRepository
24 | }
25 |
--------------------------------------------------------------------------------
/samples/notes-app/src/main/java/com/nhaarman/acorn/notesapp/internal/Logging.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.notesapp.internal
18 |
19 | import com.nhaarman.acorn.logger
20 |
21 | internal fun v(tag: String, message: Any?) = logger?.v(tag, message)
22 | internal fun d(tag: String, message: Any?) = logger?.d(tag, message)
23 | internal fun i(tag: String, message: Any?) = logger?.i(tag, message)
24 | internal fun w(tag: String, message: Any?) = logger?.w(tag, message)
25 |
--------------------------------------------------------------------------------
/samples/notes-app/src/main/java/com/nhaarman/acorn/notesapp/note/NoteItem.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.notesapp.note
18 |
19 | data class NoteItem(
20 | val id: Long,
21 | val text: String,
22 | )
23 |
--------------------------------------------------------------------------------
/samples/notes-app/src/main/java/com/nhaarman/acorn/notesapp/note/NoteItemsRepository.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2018 Niek Haarman
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.nhaarman.acorn.notesapp.note
18 |
19 | import com.nhaarman.acorn.Option
20 | import io.reactivex.Observable
21 | import io.reactivex.Single
22 |
23 | interface NoteItemsRepository {
24 |
25 | val noteItems: Observable>
26 |
27 | fun create(text: String): Single
28 |
29 | fun delete(itemId: Long)
30 | fun delete(item: NoteItem)
31 |
32 | fun find(itemId: Long): Observable