From f295e97de6a9b7005e3fd6425296a5cd9d37af6b Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 28 Jan 2020 01:49:37 +0530 Subject: Allow creating folders (#623) * Introduce EmitExpandableTransformationBehaviour * Implement expand transition * More folder work * Add icons and tweak layout clipping Rishi again with the icon rescue * Theming rework * Dont set tag * Update list and commit after creating folder * Fix theme issues * Add dialog title * Fix hint text color * Remove commit method * Cleanup * Update CHANGELOG Signed-off-by: Harsh Shandilya Co-authored-by: Aditya Wasan --- app/src/main/res/drawable/ic_action_new_folder.xml | 9 ++++ .../main/res/drawable/ic_action_new_password.xml | 9 ++++ .../main/res/drawable/ic_action_secure_24dp.xml | 2 +- .../res/drawable/ic_keyboard_arrow_right_24dp.xml | 2 +- .../main/res/drawable/ic_multiple_files_24dp.xml | 2 +- .../res/layout/folder_creation_dialog_fragment.xml | 33 ++++++++++++ app/src/main/res/layout/password_recycler_view.xml | 62 ++++++++++++++++------ app/src/main/res/layout/password_row_layout.xml | 1 - app/src/main/res/values-night/styles.xml | 7 --- app/src/main/res/values-v21/dimens.xml | 4 -- app/src/main/res/values-w820dp/dimens.xml | 6 --- app/src/main/res/values/attrs.xml | 3 -- app/src/main/res/values/colors.xml | 2 + app/src/main/res/values/dimens.xml | 3 +- app/src/main/res/values/strings.xml | 3 ++ app/src/main/res/values/styles.xml | 21 +++----- 16 files changed, 115 insertions(+), 54 deletions(-) create mode 100644 app/src/main/res/drawable/ic_action_new_folder.xml create mode 100644 app/src/main/res/drawable/ic_action_new_password.xml create mode 100644 app/src/main/res/layout/folder_creation_dialog_fragment.xml delete mode 100644 app/src/main/res/values-night/styles.xml delete mode 100644 app/src/main/res/values-v21/dimens.xml delete mode 100644 app/src/main/res/values-w820dp/dimens.xml (limited to 'app/src/main/res') diff --git a/app/src/main/res/drawable/ic_action_new_folder.xml b/app/src/main/res/drawable/ic_action_new_folder.xml new file mode 100644 index 00000000..44666001 --- /dev/null +++ b/app/src/main/res/drawable/ic_action_new_folder.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_action_new_password.xml b/app/src/main/res/drawable/ic_action_new_password.xml new file mode 100644 index 00000000..38350bd3 --- /dev/null +++ b/app/src/main/res/drawable/ic_action_new_password.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_action_secure_24dp.xml b/app/src/main/res/drawable/ic_action_secure_24dp.xml index 2968c4a0..ec7b4c21 100644 --- a/app/src/main/res/drawable/ic_action_secure_24dp.xml +++ b/app/src/main/res/drawable/ic_action_secure_24dp.xml @@ -3,7 +3,7 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" - android:tint="?attr/passwordIconColor"> + android:tint="?attr/colorOnPrimary"> diff --git a/app/src/main/res/drawable/ic_keyboard_arrow_right_24dp.xml b/app/src/main/res/drawable/ic_keyboard_arrow_right_24dp.xml index 882ab73a..ede2c488 100644 --- a/app/src/main/res/drawable/ic_keyboard_arrow_right_24dp.xml +++ b/app/src/main/res/drawable/ic_keyboard_arrow_right_24dp.xml @@ -3,7 +3,7 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" - android:tint="?attr/passwordIconColor"> + android:tint="?attr/colorOnPrimary"> diff --git a/app/src/main/res/drawable/ic_multiple_files_24dp.xml b/app/src/main/res/drawable/ic_multiple_files_24dp.xml index 1aadafbc..a504b9cc 100644 --- a/app/src/main/res/drawable/ic_multiple_files_24dp.xml +++ b/app/src/main/res/drawable/ic_multiple_files_24dp.xml @@ -3,7 +3,7 @@ android:height="24dp" android:viewportWidth="24" android:viewportHeight="24" - android:tint="?passwordIconColor"> + android:tint="?colorOnPrimary"> diff --git a/app/src/main/res/layout/folder_creation_dialog_fragment.xml b/app/src/main/res/layout/folder_creation_dialog_fragment.xml new file mode 100644 index 00000000..9d5dfda2 --- /dev/null +++ b/app/src/main/res/layout/folder_creation_dialog_fragment.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + diff --git a/app/src/main/res/layout/password_recycler_view.xml b/app/src/main/res/layout/password_recycler_view.xml index 07596335..f58543ac 100644 --- a/app/src/main/res/layout/password_recycler_view.xml +++ b/app/src/main/res/layout/password_recycler_view.xml @@ -1,11 +1,14 @@ - + + tools:itemCount="20" /> + + + + + + + - + android:layout_alignParentEnd="true" + app:backgroundTint="?attr/colorSecondary" + app:rippleColor="?attr/colorSecondary" /> + diff --git a/app/src/main/res/layout/password_row_layout.xml b/app/src/main/res/layout/password_row_layout.xml index 4339e019..0b7112b6 100644 --- a/app/src/main/res/layout/password_row_layout.xml +++ b/app/src/main/res/layout/password_row_layout.xml @@ -25,7 +25,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:textColor="?android:attr/textColor" android:textSize="18sp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@id/type_image" diff --git a/app/src/main/res/values-night/styles.xml b/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 7fda5217..00000000 --- a/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - diff --git a/app/src/main/res/values-v21/dimens.xml b/app/src/main/res/values-v21/dimens.xml deleted file mode 100644 index 3a8d4266..00000000 --- a/app/src/main/res/values-v21/dimens.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - 16dp - diff --git a/app/src/main/res/values-w820dp/dimens.xml b/app/src/main/res/values-w820dp/dimens.xml deleted file mode 100644 index 63fc8164..00000000 --- a/app/src/main/res/values-w820dp/dimens.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 64dp - diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index aa02723f..913b7a4d 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -1,8 +1,5 @@ - - - diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index ec75b5b6..48d1a7a3 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -9,6 +9,7 @@ #c63f17 #212121 #ffffff + #ffffffff #eceff1 @@ -17,4 +18,5 @@ @color/primary_text_color #FFFFFF #668eacbb + @color/primary_dark_color diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 8a517840..15c6287c 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -2,5 +2,6 @@ 16dp 16dp - 0dp + 16dp + 8dp diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e7ffa3e9..c1827ac9 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -31,6 +31,7 @@ Add password for %1$s using android password store. "Edit %1$s using android password store." + "Folder %1$s created using android password store." "Remove %1$s from store." "Rename %1$s to %2$s." "Increment HOTP counter for %1$s." @@ -278,4 +279,6 @@ Error while trying to generate the ssh-key Show hidden folders Include hidden directories in the password list + Create folder + Create diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index ad6a61ff..e6312175 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,4 +1,4 @@ - + - -- cgit v1.2.3