From 4ea875be1a5b1165cf282b4484251ef413c787bd Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sat, 27 Aug 2022 16:02:49 -0400 Subject: [PATCH 1/7] colors: Stop referring to black / grey / white directly Prepare for Material You impl --- .idea/misc.xml | 1 + .../main/res/drawable/bottom_navigation_color_selector.xml | 2 +- app/src/main/res/layout/app_list_item.xml | 6 +++--- app/src/main/res/values/colors.xml | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index b73fd9c..05b94b4 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -7,6 +7,7 @@ + diff --git a/app/src/main/res/drawable/bottom_navigation_color_selector.xml b/app/src/main/res/drawable/bottom_navigation_color_selector.xml index 6b84d3b..c7d4af1 100644 --- a/app/src/main/res/drawable/bottom_navigation_color_selector.xml +++ b/app/src/main/res/drawable/bottom_navigation_color_selector.xml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/app/src/main/res/layout/app_list_item.xml b/app/src/main/res/layout/app_list_item.xml index 79a20b1..28a505e 100644 --- a/app/src/main/res/layout/app_list_item.xml +++ b/app/src/main/res/layout/app_list_item.xml @@ -24,7 +24,7 @@ android:layout_marginStart="16dp" android:layout_marginEnd="16dp" android:layout_marginBottom="0dp" - android:textColor="@color/black" + android:textColor="@color/colorTextPrimary" android:ellipsize="marquee" app:layout_constraintStart_toEndOf="@id/list_app_icon" app:layout_constraintTop_toTopOf="parent" @@ -38,7 +38,7 @@ android:layout_marginStart="16dp" android:layout_marginEnd="16dp" android:layout_marginBottom="16dp" - android:textColor="@color/grey" + android:textColor="@color/colorTextSecondary" android:ellipsize="marquee" app:layout_constraintStart_toEndOf="@id/list_app_icon" app:layout_constraintTop_toBottomOf="@id/list_app_title" @@ -50,7 +50,7 @@ android:layout_height="24dp" android:layout_marginTop="28dp" android:layout_marginEnd="16dp" - android:textColor="@android:color/white" + android:textColor="@color/colorPrimary" android:textStyle="bold" android:background="@drawable/circle_accent" android:gravity="center" diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 431fcf7..150f465 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -4,8 +4,8 @@ #009688 #FFC107 #E0F2F1 - #333333 - #999999 + #333333 + #999999 #E0F2F1 #EEEEEE #CEE1E0 From 6db4f84d35bcd970dbf133a1be0338116b3d0e31 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sat, 27 Aug 2022 16:04:31 -0400 Subject: [PATCH 2/7] AppListFragment: ConstraintLayout cannot be the parent of SwipeRefreshLayout It causes problems with click events. Just use plain old FrameLayout for this fragment. --- .idea/misc.xml | 1 + app/src/main/res/layout/fragment_list.xml | 13 ++++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 05b94b4..ea3a166 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -8,6 +8,7 @@ + diff --git a/app/src/main/res/layout/fragment_list.xml b/app/src/main/res/layout/fragment_list.xml index d2cfa48..cd95a78 100644 --- a/app/src/main/res/layout/fragment_list.xml +++ b/app/src/main/res/layout/fragment_list.xml @@ -1,17 +1,12 @@ - + android:layout_width="match_parent" + android:layout_height="match_parent"> - \ No newline at end of file + \ No newline at end of file From f77281dc5b41858082c1d964ec186c9f15b2fddf Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sat, 27 Aug 2022 16:08:40 -0400 Subject: [PATCH 3/7] colors: Adjust colors for selected apps --- app/src/main/res/values/colors.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 150f465..4cb9323 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -7,6 +7,6 @@ #333333 #999999 #E0F2F1 - #EEEEEE + #E1E9E8 #CEE1E0 From b1de2c93b8b5c2197cb7c09881334ab1bcf55de3 Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sat, 27 Aug 2022 16:21:12 -0400 Subject: [PATCH 4/7] colors: Add colors for system-wide dark mode --- app/src/main/res/values-night/colors.xml | 12 ++++++++++++ app/src/main/res/values-night/styles.xml | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 app/src/main/res/values-night/colors.xml create mode 100644 app/src/main/res/values-night/styles.xml diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml new file mode 100644 index 0000000..f2b80f2 --- /dev/null +++ b/app/src/main/res/values-night/colors.xml @@ -0,0 +1,12 @@ + + + #00100D + #009688 + #FFC107 + #004D3F + #EEEEEE + #CCCCCC + #004D3F + #10201D + #105D4F + \ No newline at end of file diff --git a/app/src/main/res/values-night/styles.xml b/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..d404d4c --- /dev/null +++ b/app/src/main/res/values-night/styles.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file From 09e6e3db54e95ce08317252f0a8b4ac4b7221a8d Mon Sep 17 00:00:00 2001 From: Peter Cai Date: Sat, 27 Aug 2022 16:24:53 -0400 Subject: [PATCH 5/7] colors: Fix text and menu colors in night mode --- app/src/main/res/values/styles.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index dbba419..d0046c0 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -6,9 +6,13 @@ @color/colorPrimary @color/colorPrimary @color/colorAccent + @color/colorTextPrimary true true @color/colorPrimary + @color/colorTextPrimary + @color/colorTextSecondary + @color/colorPrimary + + - - - - + + + + + + +