From 38b30e73a1df75329707d73b5e3e44755fb5600e Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Thu, 15 Aug 2024 23:46:48 +0530 Subject: [PATCH] Theme app according to our palette --- Android.bp | 1 + res/drawable-anydpi-v26/fab_pink.xml | 28 +++++ ...ite_540dp.png => ic_person_white_base.png} | Bin ...ite_540dp.png => ic_person_white_base.png} | Bin ...ite_540dp.png => ic_person_white_base.png} | Bin ...ite_540dp.png => ic_person_white_base.png} | Bin ...ite_540dp.png => ic_person_white_base.png} | Bin res/drawable/dialog_background.xml | 2 +- res/drawable/person_white_540dp.xml | 19 +++ res/drawable/quantum_ic_drawer_my_info_32.xml | 10 +- res/layout-land/people_activity_toolbar.xml | 2 +- res/layout/contact_editor_activity.xml | 2 +- res/layout/contact_editor_fields.xml | 2 +- res/layout/people_activity_toolbar.xml | 2 +- res/layout/search_bar_expanded.xml | 4 +- res/layout/selection_bar.xml | 2 +- res/values-night/colors.xml | 8 +- res/values-v27/styles.xml | 16 +-- res/values/colors.xml | 116 +++++++++--------- res/values/lineage_colors.xml | 4 +- res/values/styles.xml | 28 +++-- .../contacts/activities/PeopleActivity.java | 4 +- .../contacts/drawer/DrawerAdapter.java | 2 +- .../contacts/util/MaterialColorMapUtils.java | 4 +- 24 files changed, 150 insertions(+), 106 deletions(-) create mode 100644 res/drawable-anydpi-v26/fab_pink.xml rename res/drawable-hdpi/{person_white_540dp.png => ic_person_white_base.png} (100%) rename res/drawable-mdpi/{person_white_540dp.png => ic_person_white_base.png} (100%) rename res/drawable-xhdpi/{person_white_540dp.png => ic_person_white_base.png} (100%) rename res/drawable-xxhdpi/{person_white_540dp.png => ic_person_white_base.png} (100%) rename res/drawable-xxxhdpi/{person_white_540dp.png => ic_person_white_base.png} (100%) create mode 100644 res/drawable/person_white_540dp.xml diff --git a/Android.bp b/Android.bp index 36923ab74f..617d9cdc79 100644 --- a/Android.bp +++ b/Android.bp @@ -44,6 +44,7 @@ android_app { "com.android.vcard", "guava", "libphonenumber", + "elib", ], certificate: "shared", diff --git a/res/drawable-anydpi-v26/fab_pink.xml b/res/drawable-anydpi-v26/fab_pink.xml new file mode 100644 index 0000000000..deea990297 --- /dev/null +++ b/res/drawable-anydpi-v26/fab_pink.xml @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/res/drawable-hdpi/person_white_540dp.png b/res/drawable-hdpi/ic_person_white_base.png similarity index 100% rename from res/drawable-hdpi/person_white_540dp.png rename to res/drawable-hdpi/ic_person_white_base.png diff --git a/res/drawable-mdpi/person_white_540dp.png b/res/drawable-mdpi/ic_person_white_base.png similarity index 100% rename from res/drawable-mdpi/person_white_540dp.png rename to res/drawable-mdpi/ic_person_white_base.png diff --git a/res/drawable-xhdpi/person_white_540dp.png b/res/drawable-xhdpi/ic_person_white_base.png similarity index 100% rename from res/drawable-xhdpi/person_white_540dp.png rename to res/drawable-xhdpi/ic_person_white_base.png diff --git a/res/drawable-xxhdpi/person_white_540dp.png b/res/drawable-xxhdpi/ic_person_white_base.png similarity index 100% rename from res/drawable-xxhdpi/person_white_540dp.png rename to res/drawable-xxhdpi/ic_person_white_base.png diff --git a/res/drawable-xxxhdpi/person_white_540dp.png b/res/drawable-xxxhdpi/ic_person_white_base.png similarity index 100% rename from res/drawable-xxxhdpi/person_white_540dp.png rename to res/drawable-xxxhdpi/ic_person_white_base.png diff --git a/res/drawable/dialog_background.xml b/res/drawable/dialog_background.xml index 119b08b5d5..b974abcf37 100644 --- a/res/drawable/dialog_background.xml +++ b/res/drawable/dialog_background.xml @@ -17,6 +17,6 @@ --> - + diff --git a/res/drawable/person_white_540dp.xml b/res/drawable/person_white_540dp.xml new file mode 100644 index 0000000000..479c55cbb9 --- /dev/null +++ b/res/drawable/person_white_540dp.xml @@ -0,0 +1,19 @@ + + + \ No newline at end of file diff --git a/res/drawable/quantum_ic_drawer_my_info_32.xml b/res/drawable/quantum_ic_drawer_my_info_32.xml index 4e310cb4a1..b0b0f16afe 100644 --- a/res/drawable/quantum_ic_drawer_my_info_32.xml +++ b/res/drawable/quantum_ic_drawer_my_info_32.xml @@ -5,15 +5,11 @@ android:viewportHeight="32.0"> + android:fillColor="@color/e_accent"/> + android:fillColor="@color/e_background" /> + android:fillColor="@color/e_background" /> diff --git a/res/layout-land/people_activity_toolbar.xml b/res/layout-land/people_activity_toolbar.xml index 15f12f6718..eb33d39578 100644 --- a/res/layout-land/people_activity_toolbar.xml +++ b/res/layout-land/people_activity_toolbar.xml @@ -29,7 +29,7 @@ android:id="@+id/toolbar_frame" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary"> + android:background="@color/actionbar_background_color"> diff --git a/res/layout/people_activity_toolbar.xml b/res/layout/people_activity_toolbar.xml index 4e8ea2f7e1..1bc4652dd1 100644 --- a/res/layout/people_activity_toolbar.xml +++ b/res/layout/people_activity_toolbar.xml @@ -25,7 +25,7 @@ android:id="@+id/toolbar_frame" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" - android:background="?attr/colorPrimary"> + android:background="@color/actionbar_background_color"> + android:tint="@color/e_primary_text_color" /> diff --git a/res/layout/selection_bar.xml b/res/layout/selection_bar.xml index 272a2fcf9d..0d9f8a8ef4 100644 --- a/res/layout/selection_bar.xml +++ b/res/layout/selection_bar.xml @@ -51,7 +51,7 @@ android:paddingEnd="16dp" android:paddingStart="16dp" android:text="@string/menu_add_contacts" - android:textColor="@color/primary_color" + android:textColor="@color/actionbar_text_color" android:textStyle="bold" android:visibility="gone"/> diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml index fc5bb30170..a242b5e9c2 100644 --- a/res/values-night/colors.xml +++ b/res/values-night/colors.xml @@ -5,14 +5,8 @@ --> - @*android:color/system_neutral1_900 + @color/background_primary #dadada - - - @*android:color/system_neutral1_900 - @*android:color/system_neutral1_900 - - @android:color/system_accent1_100 diff --git a/res/values-v27/styles.xml b/res/values-v27/styles.xml index e821cc1570..0187a5cabc 100644 --- a/res/values-v27/styles.xml +++ b/res/values-v27/styles.xml @@ -12,8 +12,8 @@ @style/ListViewStyle @color/background_primary @color/primary_color_dark - @color/primary_color - @color/primary_color + @color/e_accent + @color/e_accent @style/ContactsAlertDialogTheme @dimen/contact_browser_list_item_height 24dip @@ -51,10 +51,11 @@ @style/PopupMenuStyle @color/navigation_bar_bg @color/navigation_bar_divider - true + @bool/isLight + @bool/isLight - diff --git a/res/values/colors.xml b/res/values/colors.xml index f1f6effdb8..0bc9215784 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -17,40 +17,40 @@ #F5F5F5 - #dd000000 + @color/e_primary_text_color - #89000000 + @color/e_secondary_text_color - #61000000 + @color/e_disabled_color - #737373 + @color/e_secondary_text_color #202020 @color/primary_color #0f000000 - #FFFFFF + @color/e_primary_text_color - @color/primary_color + @color/e_action_bar - #f6f6f6 + @color/e_action_bar - #bababa + @color/e_action_bar - @*android:color/system_accent1_700 - @*android:color/system_accent1_600 + @color/e_action_bar + @color/e_accent - @*android:color/system_neutral1_900 - @*android:color/system_neutral1_800 + @color/e_action_bar + @color/e_action_bar @*android:color/system_neutral1_0 - @color/contacts_accent_color - @android:color/system_accent1_600 + @color/e_background + @color/e_accent @*android:color/transparent @@ -62,7 +62,7 @@ #ffffff - #f4f4f4 + @color/e_background #2aad6f #ff2e58 @@ -74,7 +74,7 @@ #7f7f7f - #40000000 + @color/e_disabled_color #40000000 @@ -86,18 +86,18 @@ #4D000000 - #efefef + @color/e_background #a0ffffff - #363636 + @color/e_primary_text_color - @color/dialtacts_secondary_text_color + @color/e_secondary_text_color - @color/dialtacts_theme_color + @color/e_primary_text_color @*android:color/system_neutral1_800 @@ -112,7 +112,7 @@ #333333 - #737373 + @color/e_secondary_text_color #7f000000 @@ -127,35 +127,35 @@ These colors are also used by MaterialColorMapUtils to generate primary activity colors. --> - @*android:color/system_accent1_300 - @*android:color/system_accent2_300 - @*android:color/system_accent3_300 - @*android:color/system_accent1_400 - @*android:color/system_accent2_400 - @*android:color/system_accent3_400 - @*android:color/system_accent1_500 - @*android:color/system_accent2_500 - @*android:color/system_accent3_500 - @*android:color/system_accent1_600 - @*android:color/system_accent2_600 - @*android:color/system_accent3_600 + #0F94F6 + #00B4B4 + #008D96 + #44B04C + #AFD83D + #FFED21 + #FFC300 + #FF7A00 + #F8432E + #ED1C61 + #ED1C61 + #5754DC - @*android:color/system_accent1_500 - @*android:color/system_accent2_500 - @*android:color/system_accent3_500 - @*android:color/system_accent1_600 - @*android:color/system_accent2_600 - @*android:color/system_accent3_600 - @*android:color/system_accent1_700 - @*android:color/system_accent2_700 - @*android:color/system_accent3_700 - @*android:color/system_accent1_800 - @*android:color/system_accent2_800 - @*android:color/system_accent3_800 + #0F94F6 + #00B4B4 + #008D96 + #44B04C + #AFD83D + #FFED21 + #FFC300 + #FF7A00 + #F8432E + #ED1C61 + #ED1C61 + #5754DC - #ffffff + @color/e_primary_text_color @color/actionbar_background_color - #ffffff + @color/e_primary_text_color #8C000000 - #DF000000 + @color/actionbar_text_color #777777 - #000000 + @color/e_primary_text_color - #ffffff + @color/e_action_bar - #66000000 + @color/e_disabled_color @color/dialtacts_theme_color - @*android:color/system_neutral1_50 - @*android:color/system_neutral1_0 + @color/e_background + @color/e_background #d1041c @@ -224,7 +224,7 @@ @color/actionbar_text_color_black #dbdbdb - @color/primary_color + @color/e_accent #333333 @@ -236,13 +236,13 @@ #e0e0e0 - #E5E5E5 + @android:color/transparent - #FAFAFA + @color/e_drawer_background - #E8E8E8 + @color/navigation_drawer_item_background #1A000000 diff --git a/res/values/lineage_colors.xml b/res/values/lineage_colors.xml index 6aee4d227e..96b4c511d0 100644 --- a/res/values/lineage_colors.xml +++ b/res/values/lineage_colors.xml @@ -15,6 +15,6 @@ limitations under the License. --> - @android:color/white - #1f000000 + @color/e_action_bar + @android:color/transparent diff --git a/res/values/styles.xml b/res/values/styles.xml index 31e1239a91..7c6dfe54ce 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -93,7 +93,7 @@ @@ -395,8 +398,7 @@ @@ -462,6 +464,8 @@ background and text color. See also android:style/Widget.Holo.TextView.ListSepar