So the user can search preferences from any screen
Changes' description:
- Move the search bar configuration from HeaderFragment.kt to the preferences activity
- a change made to it was disabling the search history, as it was poor
- Remove the previous SearchPreference bar
- Embed the searchBar by creating a new menu (preferences.xml) and a new SearchView (PreferencesSearchView)
It's necessary for all "PreferenceScreen" to have keys, so they are being added to the screens which hadn't a key
search:ignore is an attribute that allows to skip a preference indexing on a XML file. It is added to subscreens' preferences to avoid duplication of the results of the screens themselves and the preferences that open them
Added as well to "Day" and "Night" preferences to avoid duplication of their entries and "Theme" preference's entries
It's used upstream. It was defined in notes.py, but since Notes.java may not get
converted, consts is the most relevant place to put it.
Those ones were found by searching for "nodeId: Long", "NoteId: Long" and "nid:
Long".
- rename "formattedSummary" to "summaryFormat"
- simplify SeekBarPreferenceCompat and NumberRangePreferenceCompat constructors and declare styleable attributes for "useSimpleSummaryProvider" and "summaryFormat" so they can be previewed on Android Studio's layout viewer
* Add `Use the new backend` (persistent) preference
And remove the old temporary "Use V16 backend" preference
* Add a stronger warning before changing to the new backend
* Cleanup of LaTeX.kt
* Modified tests to use string literals, new hashes, functions to public
* Renamed functions to be more accurate, params/output to String, comment style
* Move HTML/Js debug to DevOptions
* Move `Card browser` and `Anki card` context menu to General
note that I changed their order: now, Anki card comes first and Card browser comes second
reason: Anki Card is enabled by default, so it's better to be seen first
* Move `Card browser font scaling` to Accessibility
To keep it together with the other "UI size" settings
* Removed check on GeneralSettingsFragment
If user had a restricted learning device, the app would crash as the preferences with keys of "widgetBlink" and "widgetVibrate" are not on the General category anymore.
These preferences were moved to NotificationsSettingsFragment on d302bcf and are handled there.
* Move `Press back twice to go back/exit` to General
* Remove `Upgrade to V2 scheduler` preference
142f789a7b forces requires/prompts to use the V2 scheduler when the user tries to study, so this preference is no longer necessary
* Remove `Perfomance` subcategory on Advanced
It had only `Backups` under it
* Reorganize `General` settings
New structure:
- Language
- Error reporting mode
- Share feature usage
- Paste Images as PNG
# Studying
- Deck for new cards
- Press back twice to leave
# System-wide
- Anki Card Menu
- Card Browser Menu
* Improve preferences_general.xml preview on Android Studio
Add preview title and summary for "Anki Card Menu" and "Card Browser Menu"
* Simplify `buildCategorySummary` calls
Add a helper method that converts the resIds to strings to reduce boilerplate
* Build `General`, `Appearance` and `Advanced` summaries programatically
And remove the old summary strings, as they aren't necessary anymore
* Extract `SettingsFragment.requirePreference()` to `PreferencesFragmentCompat.requirePreference()`
Utility method that was previously defined only on `SettingsFragment`. Now it can include other classes that inherit from `PreferencesFragmentCompat` as well, e.g. `HeaderFragment`.
As `SettingsFragment` inherits from `PreferencesFragmentCompat` too, its functionality isn't changed
* NF: Remove unchecked cast warning on `requirePreference`
Done by reifying the type and inlining the function
* Replace findPreference with requirePreference on HeaderFragment
* cleanup on HeaderFragment.kt
- simplify Advanced category configuration
- uniformize comments
* Add a comment specifying that dev options strings may not be translated
* Create a `Statistics` subcategory on Advanced preferences
Contains "Advanced statistics" and "Default deck when opening statistics"
And add "Statistics" to the Advanced category summary
* Move preferences not related to plugins out of the plugins subcategory
Moved preferences: "Text to speech", "Reset languages", "Chess notation support", "Double scrolling" and "eReader"
removeUnnecessaryAdvancedPrefs() had to be adapted, as "Double scrolling" and "eReader" aren't on the "Plugins" category anymore