diff options
author | Harsh Shandilya <msfjarvis@gmail.com> | 2019-10-01 22:14:28 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-01 22:14:28 +0530 |
commit | 073346c157ec34b750d175c8543f346e6eae94de (patch) | |
tree | a55d24ef43563f3a2d03d7938a1e96c1f5cd1caf /app/src/main/res/values | |
parent | c9dc4034f12b62f4470f92fb13ecd72871f4a5b7 (diff) |
Redesign UI and introduce dark theme (#519)
Caveats:
- The openpgp preference had to be removed because the open-intents developers are too lazy to update their libraries. Over the coming weeks I will be reimplementing a local solution for this instead.
- The autofill dialog is broken but I since it is being worked on in #410 already I'm not going to bother fixing it.
Diffstat (limited to 'app/src/main/res/values')
-rw-r--r-- | app/src/main/res/values/attrs.xml | 9 | ||||
-rw-r--r-- | app/src/main/res/values/bools.xml | 5 | ||||
-rw-r--r-- | app/src/main/res/values/colors.xml | 31 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 14 | ||||
-rw-r--r-- | app/src/main/res/values/styles.xml | 48 |
5 files changed, 73 insertions, 34 deletions
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml new file mode 100644 index 00000000..1a044c40 --- /dev/null +++ b/app/src/main/res/values/attrs.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <declare-styleable name="PasswordIconStyle"> + <attr name="passwordIconColor" format="reference|color" /> + </declare-styleable> + <declare-styleable name="Multiselected"> + <attr name="state_multiselected" format="boolean"/> + </declare-styleable> +</resources>
\ No newline at end of file diff --git a/app/src/main/res/values/bools.xml b/app/src/main/res/values/bools.xml new file mode 100644 index 00000000..b02fcc05 --- /dev/null +++ b/app/src/main/res/values/bools.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <bool name="light_status_bar">false</bool> + <bool name="light_navigation_bar">false</bool> +</resources> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index ef263161..98234581 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -1,19 +1,20 @@ <?xml version="1.0" encoding="utf-8"?> <resources> - <color name="accent">#ff7043</color> - <color name="background">#eee</color> - <color name="blue_grey_50">#eceff1</color> - <color name="blue_grey_500">#607d8b</color> - <color name="blue_grey_200">#b0bec5</color> - <color name="blue_grey_700">#455a64</color> - <color name="blue_grey_900">#263238</color> - <color name="deep_orange_200">#ffab91</color> - <color name="grey_300">#e0e0e0</color> - <color name="grey_500">#9e9e9e</color> - <color name="grey_600">#757575</color> - <color name="grey_white_1000">#ffffff</color> - <color name="grey_black_1000">#000000</color> - <color name="teal_900">#004d40</color> - <color name="teal_A700">#00bfa5</color> + <!-- Base palette --> + <color name="primary_color">#607d8b</color> + <color name="primary_light_color">#8eacbb</color> + <color name="primary_dark_color">#34515e</color> + <color name="secondary_color">#ff7043</color> + <color name="secondary_light_color">#ffa270</color> + <color name="secondary_dark_color">#c63f17</color> + <color name="primary_text_color">#212121</color> + <color name="secondary_text_color">#ffffff</color> + + <!-- Theme variables --> + <color name="window_background">#eceff1</color> <color name="ic_launcher_background">#D4F1EA</color> + <color name="password_icon_color">#757575</color> + <color name="color_control_normal">@color/primary_text_color</color> + <color name="color_surface">#FFFFFF</color> + <color name="list_multiselect_background">#EEEEEE</color> </resources> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8e54490f..e39558b1 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -74,7 +74,7 @@ <string name="server_protocol">Protocol</string> <string name="server_url">Server URL</string> <string name="server_url_hint" translatable="false">server.com</string> - <string name="server_port_hint">22</string> + <string name="server_port_hint">Port</string> <string name="default_ssh_port">22</string> <string name="default_https_port">443</string> <string name="server_path">Repo path</string> @@ -90,16 +90,16 @@ <!-- Git Config fragment --> <string name="git_config" translatable="false">Git config</string> <string name="git_user_name" translatable="false">Username</string> - <string name="git_user_name_hint">User name</string> + <string name="git_user_name_hint">Username</string> <string name="git_user_email">Email</string> <string name="git_user_email_hint">email</string> <string name="invalid_email_dialog_text">Please enter a valid email address</string> <string name="clone_button">Clone!</string> <!-- PGP Handler --> - <string name="crypto_name_hint">name</string> + <string name="crypto_name_hint">Name</string> <string name="crypto_pass_label">Password</string> - <string name="crypto_extra_label">Extra</string> + <string name="crypto_extra_label">Extra content</string> <string name="crypto_select">Select</string> <string name="crypto_cancel">Cancel</string> <string name="crypto_save">Save</string> @@ -138,8 +138,8 @@ <string name="pref_no_key_selected">No key selected</string> <string name="pref_general_title">General</string> <string name="pref_password_title">Password Show Time</string> - <string name="pref_password_dialog_title">Set the time you want the password to be in clipboard. 0 means forever.</string> - <string name="pref_copy_title">Automatically Copy Password</string> + <string name="pref_password_dialog_title">Set the time (in seconds) you want the password to be in clipboard. 0 means forever.</string> + <string name="pref_copy_title">Automatically copy Password</string> <string name="pref_copy_dialog_title">Automatically copy the password to the clipboard after decryption was successful.</string> <string name="ssh_key_success_dialog_title">SSH-key imported</string> <string name="ssh_key_error_dialog_title">Error while trying to import the ssh-key</string> @@ -251,8 +251,8 @@ <string name="remember_the_passphrase">Remember the passphrase in the app configuration (insecure)</string> <string name="hackish_tools">Hackish tools</string> <string name="abort_rebase">Abort rebase and push new branch</string> + <string name="reset_to_remote">Hard reset to remote branch</string> <string name="commit_hash">Commit hash</string> - <string name="crypto_password_edit_hint" translatable="false">p@ssw0rd!</string> <string name="crypto_extra_edit_hint">username: something other extra content</string> <string name="get_last_changed_failed">Failed to get last changed date</string> <string name="hotp_pending">Tap copy to calculate HOTP</string> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 0b0bc4e6..ad6a61ff 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -1,22 +1,46 @@ -<resources> +<resources xmlns:tools="http://schemas.android.com/tools"> <!-- Base application theme. --> - <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> - <item name="colorPrimary">@color/blue_grey_500</item> - <item name="colorPrimaryDark">@color/blue_grey_700</item> - <item name="android:windowBackground">@color/blue_grey_50</item> - <item name="android:textColorPrimary">@color/teal_900</item> - <item name="android:textColor">@color/text_color</item> + <style name="AppTheme" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> + <item name="colorPrimary">@color/primary_color</item> + <item name="colorOnPrimary">@color/color_control_normal</item> + <item name="colorPrimaryDark">@color/primary_color</item> + <item name="colorPrimaryVariant">@color/primary_light_color</item> + <item name="colorSecondary">@color/secondary_color</item> + <item name="colorOnSecondary">@android:color/white</item> + <item name="colorSurface">@color/color_surface</item> + <item name="colorOnSurface">@color/color_control_normal</item> + <item name="colorControlNormal">@color/color_control_normal</item> + <item name="passwordIconColor">@color/password_icon_color</item> + <item name="android:colorBackground">@color/window_background</item> + <item name="colorBackgroundFloating">@color/primary_dark_color</item> + <item name="android:windowBackground">@color/window_background</item> + <item name="android:textColorPrimary">@color/primary_text_color</item> + <item name="android:textColor">@color/primary_text_color</item> + <item name="android:statusBarColor">@color/primary_dark_color</item> + <item name="android:navigationBarColor">@android:color/black</item> + <item name="android:windowLightStatusBar" tools:targetApi="m">@bool/light_status_bar</item> + <item name="android:windowLightNavigationBar" tools:targetApi="o_mr1">@bool/light_navigation_bar</item> <item name="actionModeStyle">@style/ActionMode</item> + <item name="alertDialogTheme">@style/AppTheme.Dialog</item> + <item name="materialAlertDialogTheme">@style/AppTheme.Dialog</item> + <item name="actionBarPopupTheme">@style/ThemeOverlay.MaterialComponents.ActionBar</item> + </style> + + <style name="AppTheme.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert"> + <item name="colorPrimary">@color/secondary_color</item> + <item name="colorSecondary">@color/secondary_color</item> + <item name="android:windowBackground">@color/window_background</item> </style> <style name="ActionMode" parent="@style/Widget.AppCompat.ActionMode"> - <item name="background">@color/blue_grey_700</item> + <item name="background">@color/primary_color</item> </style> - <style name="FilePickerAlertDialogTheme" parent="Theme.AppCompat.Dialog.Alert"> - <item name="colorPrimary">@color/blue_grey_500</item> - <item name="colorPrimaryDark">@color/blue_grey_700</item> - <item name="colorAccent">@color/teal_A700</item> + <style name="TextInputLayoutBase" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"> + <item name="boxBackgroundColor">?android:attr/windowBackground</item> + <item name="boxStrokeColor">?attr/colorSecondary</item> + <item name="hintTextColor">?attr/colorOnPrimary</item> </style> + </resources> |