[View binding] Dialogs package
Pull Request template
Purpose / Description
Added ViewBinding for
- LocaleSelectionDialog
- DeckSelectionDialog
- MediaCheckDialog
- ScopedStorageMigrationDialog
Fixes
Part of (https://github.com/ankidroid/Anki-Android/issues/11116)
Approach
Removed findViewById with the help of implementing binding class for all the files
How Has This Been Tested?
Physical Device OnePlus Nord2
Checklist
Please, go through these checks before submitting the PR.
- [x] You have not changed whitespace unnecessarily (it makes diffs hard to read)
- [x] You have a descriptive commit message with a short title (first line, max 50 chars).
- [x] Your code follows the style of the project (e.g. never omit braces in
ifstatements) - [x] You have commented your code, particularly in hard-to-understand areas
- [x] You have performed a self-review of your own code
- [ ] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
- [ ] UI Changes: You have tested your change using the Google Accessibility Scanner
@david-allison the checks are failed because no viewBinding is available in buildGradle so when the pull request [https://github.com/ankidroid/Anki-Android/pull/11292] will be merged it will work fine

This doesn't compile.
I thought you said you were going to put in one PR for this change?
This doesn't compile.
I thought you said you were going to put in one PR for this change?
Because the main branch doesn't have viewBinding = true in buildGradle I added this in pull request [https://github.com/https://github.com/ankidroid/Anki-Android/pull/11292] no i clearly mentioned that i will open one pr for all the files which are available in each package of ichi2\anki and one commit for each file should i change the fomat? What's your opinion
I misread, apologies. How many PRs is this going to be?
I misread, apologies. How many PRs is this going to be?
Approximately 4-5 Pull requests
That's fine with me. Could you 'draft' them until they're all ready?
That's fine with me. Could you 'draft' them until they're all ready?
But all the checks for the pr's will going to be failed because this pr [https://github.com/ankidroid/Anki-Android/pull/11292] contain the changes in build gradle and that should be merged in main I guess to run all checks?
That's fine with me. Could you 'draft' them until they're all ready?
But all the checks for the pr's will going to be failed because this pr [https://github.com//pull/11292] contain the changes in build gradle and that should be merged in main I guess to run all checks?
I wouldn't be opposed to cherry picking one commit onto the 'tail' of each PR to get CI to go green, as long as the PRs are drafts (where 'tail' is the first commit in the PR, opposite of HEAD WRT the source of the branch)
@Jatin887 You should add the code to enable viewBinding to all of your PRs. If you place the lines on the same position you shouldn't get a conflict and we get the ability to run the checks.
Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically
Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically