From 085b946c7d3df2a7a24183b2949d4bacd5d16c5e Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sat, 1 Feb 2020 23:41:44 +0530 Subject: Theming related fixes (#627) * Make navigation match window background Signed-off-by: Harsh Shandilya * Remove light navigation flag Signed-off-by: Harsh Shandilya * Use black navbar in light theme windowLightNavigationBar is not portable across API 23 to 29 so we're better off with this solution Signed-off-by: Harsh Shandilya * Simplify folder dialog title UI Signed-off-by: Harsh Shandilya * Make night theme completely flat Signed-off-by: Harsh Shandilya * Remove unnecessary type Signed-off-by: Harsh Shandilya * Don't try to use non-existent external repo Signed-off-by: Harsh Shandilya Co-authored-by: Aditya Wasan --- app/src/main/java/com/zeapo/pwdstore/UserPreference.kt | 2 +- .../com/zeapo/pwdstore/ui/dialogs/FolderCreationDialogFragment.kt | 1 + app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt | 7 +++++-- app/src/main/res/layout/folder_creation_dialog_fragment.xml | 8 -------- app/src/main/res/values-night/colors.xml | 3 ++- app/src/main/res/values/bools.xml | 5 ----- app/src/main/res/values/colors.xml | 2 +- app/src/main/res/values/styles.xml | 2 +- 8 files changed, 11 insertions(+), 19 deletions(-) delete mode 100644 app/src/main/res/values/bools.xml (limited to 'app/src/main') diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt index d62f926e..bce432ea 100644 --- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt +++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt @@ -88,7 +88,7 @@ class UserPreference : AppCompatActivity() { val clearClipboard20xPreference = findPreference("clear_clipboard_20x") // Autofill preferences - autoFillEnablePreference = findPreference("autofill_enable") + autoFillEnablePreference = findPreference("autofill_enable") val autoFillAppsPreference = findPreference("autofill_apps") val autoFillDefaultPreference = findPreference("autofill_default") val autoFillAlwaysShowDialogPreference = findPreference("autofill_always") diff --git a/app/src/main/java/com/zeapo/pwdstore/ui/dialogs/FolderCreationDialogFragment.kt b/app/src/main/java/com/zeapo/pwdstore/ui/dialogs/FolderCreationDialogFragment.kt index b9df5613..3b00ec11 100644 --- a/app/src/main/java/com/zeapo/pwdstore/ui/dialogs/FolderCreationDialogFragment.kt +++ b/app/src/main/java/com/zeapo/pwdstore/ui/dialogs/FolderCreationDialogFragment.kt @@ -18,6 +18,7 @@ import java.io.File class FolderCreationDialogFragment : DialogFragment() { override fun onCreateDialog(savedInstanceState: Bundle?): Dialog { val alertDialogBuilder = MaterialAlertDialogBuilder(requireContext()) + alertDialogBuilder.setTitle(R.string.title_create_folder) alertDialogBuilder.setView(R.layout.folder_creation_dialog_fragment) alertDialogBuilder.setPositiveButton(getString(R.string.button_create)) { _: DialogInterface, _: Int -> createDirectory(requireArguments().getString(CURRENT_DIR_EXTRA)!!) diff --git a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt index f6ba7d32..06608671 100644 --- a/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt +++ b/app/src/main/java/com/zeapo/pwdstore/utils/PasswordRepository.kt @@ -145,9 +145,12 @@ open class PasswordRepository protected constructor() { } return if (settings.getBoolean("git_external", false)) { val externalRepo = settings.getString("git_external_repo", null) - File(requireNotNull(externalRepo)) + if (externalRepo != null) + File(externalRepo) + else + File(context.filesDir.toString(), "/store") } else { - File(context.filesDir.toString() + "/store") + File(context.filesDir.toString(), "/store") } } diff --git a/app/src/main/res/layout/folder_creation_dialog_fragment.xml b/app/src/main/res/layout/folder_creation_dialog_fragment.xml index 9d5dfda2..dbaf97b3 100644 --- a/app/src/main/res/layout/folder_creation_dialog_fragment.xml +++ b/app/src/main/res/layout/folder_creation_dialog_fragment.xml @@ -7,18 +7,10 @@ android:orientation="vertical" android:padding="16dp"> - - diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index f5d63513..9dfc9d73 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -12,7 +12,8 @@ @color/primary_color - #FAFAFA #FF111111 + @color/primary_color #66EEEEEE + @color/window_background diff --git a/app/src/main/res/values/bools.xml b/app/src/main/res/values/bools.xml deleted file mode 100644 index b02fcc05..00000000 --- a/app/src/main/res/values/bools.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - false - false - diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 48d1a7a3..f8fa1170 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -14,9 +14,9 @@ #eceff1 #D4F1EA - #757575 @color/primary_text_color #FFFFFF #668eacbb + #000000 @color/primary_dark_color diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index e6312175..4f23a285 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -14,7 +14,7 @@ @color/color_control_normal @color/primary_color @color/status_bar_color - @bool/light_status_bar + @color/navigation_bar_color @color/window_background @style/ActionMode @style/AppTheme.Dialog -- cgit v1.2.3