Anki-Android
Anki-Android copied to clipboard
Implement new backend for note types activity
This PR enables the new backend for viewing and changing notetypes. With the new implementation:
- add new activity for new backend implementation, ManageNotetypes(the old activity ModelBrowser would be deleted when the new backend becomes the default)
- full support for coroutines(and with progress) with all backend calls
- improve UI for the notes types list by using CardView(ideally we would use the material cards but we don't currently inherit from the material themes)
- fix some of the UX reported issues, like providing a uniform add action(by using the platform FloatingActionButton) and stop using the hard to discover context menu in favor of in layout actions for each item
- enable some checks for the notes types names when renaming or adding new entries
- introduce some UI model classes to better isolate the backend from the UI code
- other changes to streamline the UI and avoid pitfalls of the previous code(like double dialogs, issues with backstack, performance)
What's not implemented:
- the old code in ModelBrowser had two options when adding a new notetype: add and clone. I looked at the code and I don't understand the difference between them so in my implementation I only did clone. Some advice here would be welcomed
- no tests(can we use the new backed in tests)
Some images:




How Has This Been Tested?
Ran all checks, manually tested the features.
Checklist
- [x] You have a descriptive commit message with a short title (first line, max 50 chars).
- [x] You have commented your code, particularly in hard-to-understand areas
- [x] You have performed a self-review of your own code
- [x] 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