This commit switch the previewer menu from MateralToolbar to toolbar so that it has the same menu has the editor.
It introduces setupCommonMenu and handleCommonMenuItemSelected that add the previewer's menu entry and handle them. They are called from the editor's menu if the view is fragmented, and from the previewer's own menu otherwise.
This commit adds a fragmented variable to TemplatePreviewerArguments, to
let the previewer knows whether it belongs to a fragmented view. If so,
the previewer's back button is removed, hence only the editor's back
button remain.
On xlarge screen, display the previewer on the trailing side of the card template editor
This commit introduces a new view, card_template_editor.xml, that contains the card template editor (implemented in card_template_editor_activity.xml) and potentially the previewer on xlarge screen.
CardTemplateEditor.kt simply set the content view to card_template_editor instead of card_template_editor_activity, and add the previewer if needed.
It was agreed we use camelCase consistently and
that snake_case was to be applied by `@LibAnkiAlias`
A few legacy methods would have conflicted
rename:
* addField -> addFieldLegacy
* renameField -> renameFieldLegacy
* remField -> remFieldLegacy
* moveField -> moveFieldLegacy
implementation:
search for `fun.*_` inside `libAnki`
Fixes 11582
It was agreed we use camelCase consistently and
that snake_case was to be applied by `@LibAnkiAlias`
implementation:
search for `fun.*_` inside `libAnki`
inline:
* _addTemplate
* _addField
A few legacy methods in `Notetypes.kt` weren't handled
Fixes 11582
Implemented keyboard shortcuts to enhance the user experience by providing quick access to commonly used functionalitie. The following shortcuts have been added:
T: Opens Statistics.
D: Creates a Deck
C: Check database
F: Creates a Filtered Deck.
Del: Deletes the currently focused Deck (on large screen only) with
confirmation dialog.
Shift+Del: Deletes deck without confirmation dialog (on large screen
only)
R: Renames the Deck (on large screen only)
P: Opens Settings.
M: Checks Media.
Ctrl+ E: triggers the Export Collection dialog.
Ctrl + Shift + I: Opens the Import dialog.
Ctrl + Shift + N: Opens Manage Note Types.
Ctrl+B: Restore from backup
* refactor: viewModel to use generic media terms and livedata
* refactor: use reselect string instead of restart
* refactor: extract MenuProvider class
* refactor: show multimedia bottomsheet in case result is cancelled
-Added right-click support for all existing long click listeners.
-Created an OnContextAndLongClickListener interface to handle both context click and long click events consistently.
-This interface includes an onAction method to define the common action (context and long click).
-The interface ensures that both listeners are set without duplicating code.
-Applied the OnContextAndLongClickListener interface to handle right-click and long-click events uniformly.
* Set .gitattributes to automatically detect text files, enabling git to
remove CRLF.
* Keep CRLF for .bat files
* Use .editorconfig to avoid further introduction of CRLF
Use the existing "Gallery" string which is translatable in Crowdin for:
- the "Gallery" option label in the menu of "Select image" in "Image Occlusion" note type
- the "Gallery" option label in the menu of multimedia file attachment in the note editor
8e0b537b1d introduced a call to `updateMenuState()` at the
loadDeckCounts job to update the undo label state when the deck is
reloaded.
Following the method name, the whole menu is updated instead of only the
undo label, which includes checking if there are changes to sync
remotely, and that takes time, so it shouldn't be done if not necessary.
The plugin hasn't been updated for quite some time and it currently
breaks the build and apk publishing. This PR removes it along its
configuration and any additional setup code.
The plugin was already removed from the publishing process as it
didn't work anymore. See https://github.com/ankidroid/Anki-Android/issues/14161