From 93f4a65c74ba32d0bbf26c8e66bf9e4e1e213340 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 9 Sep 2019 19:35:59 +0200 Subject: [PATCH] Styled FABs and actions --- app/src/main/res/color/action_foreground.xml | 5 +++++ .../main/res/color/bottomnav_foreground.xml | 5 ----- app/src/main/res/layout/fragment_accounts.xml | 8 +++---- app/src/main/res/layout/fragment_answer.xml | 4 ++-- app/src/main/res/layout/fragment_answers.xml | 4 ++-- app/src/main/res/layout/fragment_compose.xml | 10 ++++----- app/src/main/res/layout/fragment_folders.xml | 6 +++--- .../main/res/layout/fragment_identities.xml | 4 ++-- app/src/main/res/layout/fragment_messages.xml | 21 ++++++++++--------- app/src/main/res/layout/fragment_rule.xml | 4 ++-- app/src/main/res/layout/fragment_rules.xml | 4 ++-- .../res/layout/include_message_navigation.xml | 18 +++++++++------- app/src/main/res/values/colors.xml | 1 + app/src/main/res/values/styles.xml | 21 +++++++++++++++++++ 14 files changed, 71 insertions(+), 44 deletions(-) create mode 100644 app/src/main/res/color/action_foreground.xml delete mode 100644 app/src/main/res/color/bottomnav_foreground.xml diff --git a/app/src/main/res/color/action_foreground.xml b/app/src/main/res/color/action_foreground.xml new file mode 100644 index 0000000000..6a7997b452 --- /dev/null +++ b/app/src/main/res/color/action_foreground.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/app/src/main/res/color/bottomnav_foreground.xml b/app/src/main/res/color/bottomnav_foreground.xml deleted file mode 100644 index e06e1683de..0000000000 --- a/app/src/main/res/color/bottomnav_foreground.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/app/src/main/res/layout/fragment_accounts.xml b/app/src/main/res/layout/fragment_accounts.xml index 5273940ae2..38d21c1088 100644 --- a/app/src/main/res/layout/fragment_accounts.xml +++ b/app/src/main/res/layout/fragment_accounts.xml @@ -48,9 +48,9 @@ android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="@dimen/fab_padding" - android:tint="@color/colorActionForeground" + android:tint="?attr/colorFabForeground" android:tooltipText="@string/title_compose" - app:backgroundTint="?attr/colorAccent" + app:backgroundTint="?attr/colorFabBackground" app:srcCompat="@drawable/baseline_edit_24" /> diff --git a/app/src/main/res/layout/fragment_answer.xml b/app/src/main/res/layout/fragment_answer.xml index dafcdef6ac..02dfd42eff 100644 --- a/app/src/main/res/layout/fragment_answer.xml +++ b/app/src/main/res/layout/fragment_answer.xml @@ -73,8 +73,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" - app:itemIconTint="@color/bottomnav_foreground" - app:itemTextColor="@color/bottomnav_foreground" + app:itemIconTint="@color/action_foreground" + app:itemTextColor="@color/action_foreground" app:labelVisibilityMode="labeled" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout/fragment_answers.xml b/app/src/main/res/layout/fragment_answers.xml index 5c209860aa..6181ebbfe5 100644 --- a/app/src/main/res/layout/fragment_answers.xml +++ b/app/src/main/res/layout/fragment_answers.xml @@ -48,8 +48,8 @@ android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="@dimen/fab_padding" - android:tint="@color/colorActionForeground" + android:tint="?attr/colorFabForeground" android:tooltipText="@string/title_add" - app:backgroundTint="?attr/colorAccent" + app:backgroundTint="?attr/colorFabBackground" app:srcCompat="@drawable/baseline_add_24" /> diff --git a/app/src/main/res/layout/fragment_compose.xml b/app/src/main/res/layout/fragment_compose.xml index 9f0eac9c63..3a06ba1f2f 100644 --- a/app/src/main/res/layout/fragment_compose.xml +++ b/app/src/main/res/layout/fragment_compose.xml @@ -416,9 +416,9 @@ android:id="@+id/edit_bar" android:layout_width="match_parent" android:layout_height="36dp" - android:background="?attr/colorSeparator" - app:itemIconTint="@color/bottomnav_foreground" - app:itemTextColor="@color/bottomnav_foreground" + android:background="?attr/colorActionBackground" + app:itemIconTint="@color/action_foreground" + app:itemTextColor="@color/action_foreground" app:labelVisibilityMode="unlabeled" app:layout_constraintBottom_toTopOf="@+id/bottom_navigation" app:layout_constraintEnd_toEndOf="parent" @@ -430,8 +430,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" - app:itemIconTint="@color/bottomnav_foreground" - app:itemTextColor="@color/bottomnav_foreground" + app:itemIconTint="@color/action_foreground" + app:itemTextColor="@color/action_foreground" app:labelVisibilityMode="labeled" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout/fragment_folders.xml b/app/src/main/res/layout/fragment_folders.xml index c6c9bb2a61..1a831c3c5a 100644 --- a/app/src/main/res/layout/fragment_folders.xml +++ b/app/src/main/res/layout/fragment_folders.xml @@ -128,9 +128,9 @@ android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="@dimen/fab_padding" - android:tint="@color/colorActionForeground" + android:tint="?attr/colorFabForeground" android:tooltipText="@string/title_add" - app:backgroundTint="?attr/colorAccent" + app:backgroundTint="?attr/colorFabBackground" app:srcCompat="@drawable/baseline_create_new_folder_24" /> diff --git a/app/src/main/res/layout/fragment_identities.xml b/app/src/main/res/layout/fragment_identities.xml index c779d0adf7..88f90397c4 100644 --- a/app/src/main/res/layout/fragment_identities.xml +++ b/app/src/main/res/layout/fragment_identities.xml @@ -48,8 +48,8 @@ android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="@dimen/fab_padding" - android:tint="@color/colorActionForeground" + android:tint="?attr/colorFabForeground" android:tooltipText="@string/title_add" - app:backgroundTint="?attr/colorAccent" + app:backgroundTint="?attr/colorFabBackground" app:srcCompat="@drawable/baseline_add_24" /> diff --git a/app/src/main/res/layout/fragment_messages.xml b/app/src/main/res/layout/fragment_messages.xml index b4f303c8bb..488ccd4860 100644 --- a/app/src/main/res/layout/fragment_messages.xml +++ b/app/src/main/res/layout/fragment_messages.xml @@ -182,7 +182,8 @@ android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="@dimen/fab_padding" - android:tint="@color/colorActionForeground" + android:tint="?attr/colorFabForeground" + app:backgroundTint="?attr/colorFabBackground" app:layout_constraintBottom_toTopOf="@+id/sbThread" app:layout_constraintEnd_toEndOf="parent" app:srcCompat="@drawable/baseline_reply_24" /> @@ -263,8 +264,8 @@ android:layout_width="match_parent" android:layout_height="36dp" android:background="?attr/colorPrimary" - app:itemIconTint="@color/bottomnav_foreground" - app:itemTextColor="@color/bottomnav_foreground" + app:itemIconTint="@color/action_foreground" + app:itemTextColor="@color/action_foreground" app:labelVisibilityMode="unlabeled" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" @@ -310,9 +311,9 @@ android:layout_gravity="end|bottom" android:layout_marginEnd="@dimen/fab_padding" android:layout_marginBottom="90dp" - android:tint="@color/colorActionForeground" + android:tint="?attr/colorFabForeground" android:tooltipText="@string/title_more" - app:backgroundTint="?attr/colorAccent" + app:backgroundTint="?attr/colorFabBackground" app:srcCompat="@drawable/baseline_more_vert_24" /> diff --git a/app/src/main/res/layout/fragment_rule.xml b/app/src/main/res/layout/fragment_rule.xml index bb8ae1aec5..59621eb40e 100644 --- a/app/src/main/res/layout/fragment_rule.xml +++ b/app/src/main/res/layout/fragment_rule.xml @@ -671,8 +671,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?attr/colorPrimary" - app:itemIconTint="@color/bottomnav_foreground" - app:itemTextColor="@color/bottomnav_foreground" + app:itemIconTint="@color/action_foreground" + app:itemTextColor="@color/action_foreground" app:labelVisibilityMode="labeled" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout/fragment_rules.xml b/app/src/main/res/layout/fragment_rules.xml index 6343a092f3..428e624a15 100644 --- a/app/src/main/res/layout/fragment_rules.xml +++ b/app/src/main/res/layout/fragment_rules.xml @@ -48,8 +48,8 @@ android:layout_height="wrap_content" android:layout_gravity="end|bottom" android:layout_margin="@dimen/fab_padding" - android:tint="@color/colorActionForeground" + android:tint="?attr/colorFabForeground" android:tooltipText="@string/title_add" - app:backgroundTint="?attr/colorAccent" + app:backgroundTint="?attr/colorFabBackground" app:srcCompat="@drawable/baseline_add_24" /> diff --git a/app/src/main/res/layout/include_message_navigation.xml b/app/src/main/res/layout/include_message_navigation.xml index 9fe9c23943..3a29721864 100644 --- a/app/src/main/res/layout/include_message_navigation.xml +++ b/app/src/main/res/layout/include_message_navigation.xml @@ -9,9 +9,9 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginTop="3dp" - android:background="?attr/colorSeparator" - app:itemIconTint="@color/bottomnav_foreground" - app:itemTextColor="@color/bottomnav_foreground" + android:background="?attr/colorActionBackground" + app:itemIconTint="@color/action_foreground" + app:itemTextColor="@color/action_foreground" app:labelVisibilityMode="labeled" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -24,8 +24,9 @@ android:layout_height="wrap_content" android:layout_marginTop="3dp" android:layout_marginEnd="6dp" + android:backgroundTint="?attr/colorActionBackground" android:contentDescription="@string/title_decrypt" - android:tint="@color/bottomnav_foreground" + android:tint="@color/action_foreground" app:layout_constraintEnd_toStartOf="@+id/ibUnsubscribe" app:layout_constraintTop_toBottomOf="@id/bnvActions" app:srcCompat="@drawable/baseline_no_encryption_24" /> @@ -36,8 +37,9 @@ android:layout_height="wrap_content" android:layout_marginTop="3dp" android:layout_marginEnd="6dp" + android:backgroundTint="?attr/colorActionBackground" android:contentDescription="@string/title_legend_show_unsubscribe" - android:tint="@color/bottomnav_foreground" + android:tint="@color/action_foreground" app:layout_constraintEnd_toStartOf="@+id/ibImages" app:layout_constraintTop_toBottomOf="@id/bnvActions" app:srcCompat="@drawable/baseline_unsubscribe_24" /> @@ -48,8 +50,9 @@ android:layout_height="wrap_content" android:layout_marginTop="3dp" android:layout_marginEnd="6dp" + android:backgroundTint="?attr/colorActionBackground" android:contentDescription="@string/title_legend_show_images" - android:tint="@color/bottomnav_foreground" + android:tint="@color/action_foreground" app:layout_constraintEnd_toStartOf="@+id/ibFull" app:layout_constraintTop_toBottomOf="@id/bnvActions" app:srcCompat="@drawable/baseline_image_24" /> @@ -59,8 +62,9 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="3dp" + android:backgroundTint="?attr/colorActionBackground" android:contentDescription="@string/title_legend_show_full" - android:tint="@color/bottomnav_foreground" + android:tint="@color/action_foreground" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/bnvActions" app:srcCompat="@drawable/baseline_fullscreen_24" /> diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 1a4ad110a2..e840d5a03a 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -21,6 +21,7 @@ #fff #ccc + #ccc #fff #7f000000 diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 09649e2edc..25ab8f3085 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -7,6 +7,11 @@ + + + + + @@ -29,6 +34,13 @@ @color/lightColorCardBackground + @color/colorActionForeground + @color/colorActionForegroundDisabled + @color/colorActionBackground + + @android:color/white + @color/colorAccent + @android:color/white @color/colorPrimaryDark @@ -64,6 +76,9 @@ @color/darkColorCardBackground + @android:color/white + @color/colorAccent + @android:color/white @color/colorPrimaryDark @@ -97,6 +112,8 @@ @color/greyAccent + @color/greyAccent + @android:color/white @color/greyAccent @@ -110,6 +127,10 @@ @color/greyAccent @color/greyPrimary + @color/greyPrimary + + @color/greyAccent + @android:color/white @color/greyAccent