From e74aa098796c564fd41cc3491b1769fb2dfbf5e8 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Mon, 17 May 2021 18:15:53 +0200 Subject: [PATCH 1/2] remove custom password animation and use default/component one Signed-off-by: Andy Scherzinger --- .../bottomsheet/EntryMenuController.java | 7 +- .../res/drawable/asl_password_visibility.xml | 39 --------- .../main/res/drawable/avd_hide_password.xml | 85 ------------------- .../main/res/drawable/avd_show_password.xml | 85 ------------------- .../main/res/drawable/ic_password_masked.xml | 29 ------- .../main/res/drawable/ic_password_visible.xml | 29 ------- .../main/res/layout/controller_entry_menu.xml | 1 - app/src/main/res/values/ints.xml | 24 ------ app/src/main/res/values/strings.xml | 1 - 9 files changed, 6 insertions(+), 294 deletions(-) delete mode 100644 app/src/main/res/drawable/asl_password_visibility.xml delete mode 100644 app/src/main/res/drawable/avd_hide_password.xml delete mode 100644 app/src/main/res/drawable/avd_show_password.xml delete mode 100644 app/src/main/res/drawable/ic_password_masked.xml delete mode 100644 app/src/main/res/drawable/ic_password_visible.xml delete mode 100644 app/src/main/res/values/ints.xml diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java index ebb699170..e57318f31 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java @@ -326,7 +326,12 @@ public class EntryMenuController extends BaseController { break; } - textInputLayout.setPasswordVisibilityToggleEnabled(operationCode == 99 || operationCode == 4 || operationCode == 6 || operationCode == 7); + if (operationCode == 99 || operationCode == 4 || operationCode == 6 || operationCode == 7) { + textInputLayout.setEndIconMode(TextInputLayout.END_ICON_PASSWORD_TOGGLE); + } else { + textInputLayout.setEndIconMode(TextInputLayout.END_ICON_NONE); + } + textInputLayout.setHint(labelText); textInputLayout.requestFocus(); } diff --git a/app/src/main/res/drawable/asl_password_visibility.xml b/app/src/main/res/drawable/asl_password_visibility.xml deleted file mode 100644 index 692d1888d..000000000 --- a/app/src/main/res/drawable/asl_password_visibility.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - diff --git a/app/src/main/res/drawable/avd_hide_password.xml b/app/src/main/res/drawable/avd_hide_password.xml deleted file mode 100644 index e942ce865..000000000 --- a/app/src/main/res/drawable/avd_hide_password.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/drawable/avd_show_password.xml b/app/src/main/res/drawable/avd_show_password.xml deleted file mode 100644 index e942ce865..000000000 --- a/app/src/main/res/drawable/avd_show_password.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/src/main/res/drawable/ic_password_masked.xml b/app/src/main/res/drawable/ic_password_masked.xml deleted file mode 100644 index d2a76b990..000000000 --- a/app/src/main/res/drawable/ic_password_masked.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/drawable/ic_password_visible.xml b/app/src/main/res/drawable/ic_password_visible.xml deleted file mode 100644 index 585cbbf21..000000000 --- a/app/src/main/res/drawable/ic_password_visible.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/layout/controller_entry_menu.xml b/app/src/main/res/layout/controller_entry_menu.xml index 8f10d5568..c1a75898e 100644 --- a/app/src/main/res/layout/controller_entry_menu.xml +++ b/app/src/main/res/layout/controller_entry_menu.xml @@ -52,7 +52,6 @@ android:layout_marginEnd="@dimen/standard_half_margin" android:layout_toStartOf="@id/smileyButton" app:errorTextAppearance="@style/ErrorAppearance" - app:passwordToggleDrawable="@drawable/asl_password_visibility" app:passwordToggleTint="@color/grey_600"> - - - - 320 - \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2028c7924..67253fd8c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -424,7 +424,6 @@ Search in %s - M3.27,4.27L19.74,20.74 999+ Open main menu Failed to save %1$s From a1b64c3c9ae44efd58e2515596ff929303145ae8 Mon Sep 17 00:00:00 2001 From: Andy Scherzinger Date: Tue, 18 May 2021 09:31:56 +0200 Subject: [PATCH 2/2] remove unused namespace declaration Signed-off-by: Andy Scherzinger --- app/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 67253fd8c..277c784d6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -20,7 +20,7 @@ ~ along with this program. If not, see . --> - + Yes No