facebook / facebook/litho

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

Open
#909 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
7.8k
Forks
768
PR merge metrics
No merged PRs in 30d

Description

- [X] I have searched [existing issues](https://github.com/facebook/litho/issues) and this is not a duplicate

## 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](https://github.com/facebook/litho/search?q=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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.