-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OnBackpress deprecation handled #13586
OnBackpress deprecation handled #13586
Conversation
… mudssir-onBackPressDeprication-branch
First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Template ignored .
Please fill the PR template, else the PR will get closed.
I'm new here, Thanks for the mention! |
Really sorry this has sat so long! It looks like the correct direction to go to fix the problem correctly. I'll see if I can fix it up against the current API34 compile target in dependency-updates branch and get this landed as part of the effort to resolve #14558 |
related commit 9ec94ed |
Marking as |
From what I understood about predictive back navigation there's a lot more work to be done to properly implement it(check this answer from one of the engineers working on it), it's not as simple as adding onBackPressedDispatcher.addCallback() and deleting onBackPressed(). As an example, I implemented this predictive back navigation in AnkiPackageImporterFragment(at least how I think it should be implemented). I would recommend that we close this PR + the linked api 33 deprecation issue and we move to track it in #14558 . |
Agreed |
I gave a ride to testing the predictive stuff. I guess that we could use a simple version of it while this thing actually gets out to the general public (it is still restricted to a developer option) and more activities are updated to good Android practices. |
I still think keeping the deprecated onBackPressed() method along with the warning is better to indicate that work needs to be done vs adding a simple callback, removing the warnings and realizing when the feature becomes available that we need to do work to actually implement it. After a quick look I think we could resolve like half of the deprecations now. |
Pull Request template
Purpose / Description
deprecation: compileSdk 33 issues, In this PR onBackPress depreciation, is handled.
Fixes
I change onBackPress with onBackPressedDispatcher.
Issue Link
Approach
onBackPress handled with onBackPressedDispatcher.
How Has This Been Tested?
Manual test in my Handset.
I test manually by going to the screen.
Checklist
Please, go through these checks before submitting the PR.