Skip to content

4.0.0-preview-2

Compare
Choose a tag to compare
@EricKuck EricKuck released this 24 Mar 15:54
· 6 commits to develop since this release

Conductor 4.0's second public preview

Updates from preview-1

  • Removed LifecycleController and merged lifecycle support into the main Controller class
  • Activity-hosted Routers now default to PopRootControllerMode.NEVER, which has always been the suggested setting.
  • Removed first-party support for AutoDispose
  • Added a back handling demo to the demo app

Predictive back opt-in updates

Changes needed to fully support predictive back gestures in your app:

  • Call setOnBackPressedDispatcherEnabled(true) on your Activity's Router.
  • Remove the override of onBackPressed() from the Activity. No replacement is needed.
  • Opt in to predictive back gestures in your manifest file as shown here.
  • Replace any override of handleBack(), which is now deprecated, with an OnBackPressedCallback. Example callback:
    onBackPressedDispatcher?.addCallback(lifecycleOwner, object : OnBackPressedCallback(enabled = true) {
      override fun handleOnBackPressed() {
        println("back handled")
      }
    })