From 19308648b4b68fc942cd5b0bcc5d2e29b4dbfb72 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Sun, 29 Sep 2024 19:44:01 +0200 Subject: [PATCH] Improve Manage note type with big text Currently, when text is big for accessibility, and text is long, such as French localization, some button overlaps. This commit correct it by ensuring that text follow the Material Dialog. It stay horizontal normally. But can become vertical when there is not enough horizontal room. It follows the implementation of https://github.com/material-components/material-components-android/blob/master/lib/java/com/google/android/material/dialog/res/layout/m3_alert_dialog_actions.xml Thanks to https://redirect.github.com/david-allison for the tip of using the material dialog implementation. I admit I'm not a fan of the result. This is a lot of real estate and will require to scroll potentially a lot. Also, it's really not clear how to: * copy a note type (you should tap on the plus symbol) * edit the list of fiels (tap anywhere on the note type except on the buttons) So in my opinion, it'd be better to just remove all buttons, and when a user tap on a card, we open a standard menu that allows to do: * Edit cards * Edit fields * Rename * Copy * Delete But, given that this is already an improvement (for the broken case) and should not change anything for the not broken case, I believe it's still worth merging it. I'm quite sorry @Aditya13s for the work it seems you did, that was also solving the problem but in a way that is less standard in Android. Bug: #17100 --- .../src/main/res/layout/item_manage_note_type.xml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/AnkiDroid/src/main/res/layout/item_manage_note_type.xml b/AnkiDroid/src/main/res/layout/item_manage_note_type.xml index 00c18dda8131..431ae41f2126 100644 --- a/AnkiDroid/src/main/res/layout/item_manage_note_type.xml +++ b/AnkiDroid/src/main/res/layout/item_manage_note_type.xml @@ -33,7 +33,7 @@ tools:text="912 notes"/> -