Skip to content

Are there any plans to replace unsupported APIs (KEYCODE_BACK and #onBackPressed) to support Android's new Predictive back gesture?  #909

@dzuluaga

Description

@dzuluaga

Version

Add the version of the litho packages you use. You can paste the dependency
section of the gradle file if you have one.

Issues and Steps to Reproduce

  1. EnableOnBackInvokedCallback=true in the AndroidManifest.xml of any given app
  2. TargetSdkVersion 33
  3. Enable Predictive Animations developer option
  4. Use the back gesture in an app that uses unsupported APIS:
    • OnBackPressed ExamplesLithoLabActivity, ViewPagerLifecycleActivity
  5. Either the codelab or app based on ViewPagerLifecycle Activity might crash due to usage of unsupported APIs.

Expected Behavior

The back gesture should work as intended. The predictive back animation when swiping in left or right to go back-to-home should display in Android 13.

Link to Code

The new APIs, docs, and samples are available from the above link. Please reply if you need more info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions