From c7bd4b20b6a1bee1d89f9a4bfd63940c0551d807 Mon Sep 17 00:00:00 2001 From: MOHIT GUPTA <76530270+MohitGupta121@users.noreply.github.com> Date: Sat, 4 Feb 2023 23:50:53 +0530 Subject: [PATCH] Dark mode implementation - Fixed Post PR Changes Part 2 (#4867) ## Explanation Dark mode implementation - Fixed Post PR Changes Part 2 This PR changes following Dark Mode Post PR :- 1. Check dark-mode light mode staples for all radio-buttons: ReadingTextSize,AudioLanguage,AppLanguage,etc. 2. Merge `component_color_shared_multipane_icon_color`and `component_color_lessons_tab_activity_lesson_card_drop_down_arrow_color` 3. Try removing `component_color_profile_chooser_activity_white_text_color` ## Essential Checklist - [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".) - [x] Any changes to [scripts/assets](https://github.com/oppia/oppia-android/tree/develop/scripts/assets) files have their rationale included in the PR explanation. - [x] The PR follows the [style guide](https://github.com/oppia/oppia-android/wiki/Coding-style-guide). - [x] The PR does not contain any unnecessary code changes from Android Studio ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#undo-unnecessary-changes)). - [x] The PR is made from a branch that's **not** called "develop" and is up-to-date with "develop". - [x] The PR is **assigned** to the appropriate reviewers ([reference](https://github.com/oppia/oppia-android/wiki/Guidance-on-submitting-a-PR#clarification-regarding-assignees-and-reviewers-section)). ## For UI-specific PRs only ### Radio Buttons If your PR includes UI-related changes, then: - Add screenshots for portrait/landscape for both a tablet & phone of the before & after UI changes - For the screenshots above, include both English and pseudo-localized (RTL) screenshots (see [RTL guide](https://github.com/oppia/oppia-android/wiki/RTL-Guidelines)) - Add a video showing the full UX flow with a screen reader enabled (see [accessibility guide](https://github.com/oppia/oppia-android/wiki/Accessibility-(A11y)-Guide)) - Add a screenshot demonstrating that you ran affected Espresso tests locally & that they're passing --- app/src/main/res/drawable/radio_checked.xml | 4 ++-- app/src/main/res/drawable/radio_unchecked.xml | 2 +- app/src/main/res/layout-land/profile_chooser_fragment.xml | 2 +- .../main/res/layout-land/profile_chooser_profile_view.xml | 6 +++--- .../layout-sw600dp-land/profile_chooser_profile_view.xml | 6 +++--- .../res/layout-sw600dp-land/topic_lessons_story_summary.xml | 2 +- .../layout-sw600dp-port/profile_chooser_profile_view.xml | 6 +++--- .../main/res/layout-sw600dp/profile_chooser_fragment.xml | 2 +- app/src/main/res/layout/profile_chooser_fragment.xml | 2 +- app/src/main/res/layout/profile_chooser_profile_view.xml | 6 +++--- app/src/main/res/layout/topic_lessons_story_summary.xml | 2 +- app/src/main/res/values-night/color_palette.xml | 2 ++ app/src/main/res/values/color_defs.xml | 1 + app/src/main/res/values/color_palette.xml | 2 ++ app/src/main/res/values/component_colors.xml | 4 ++-- 15 files changed, 27 insertions(+), 22 deletions(-) diff --git a/app/src/main/res/drawable/radio_checked.xml b/app/src/main/res/drawable/radio_checked.xml index 82c707e7d21..f3a8fb6707c 100644 --- a/app/src/main/res/drawable/radio_checked.xml +++ b/app/src/main/res/drawable/radio_checked.xml @@ -4,7 +4,7 @@ + android:color="@color/component_color_shared_radio_button_checked_color" /> @@ -16,7 +16,7 @@ android:right="5dp" android:top="5dp"> - + diff --git a/app/src/main/res/drawable/radio_unchecked.xml b/app/src/main/res/drawable/radio_unchecked.xml index caf47bf3312..b6d458e2911 100644 --- a/app/src/main/res/drawable/radio_unchecked.xml +++ b/app/src/main/res/drawable/radio_unchecked.xml @@ -3,7 +3,7 @@ android:shape="oval"> + android:color="@color/component_color_shared_radio_button_unchecked_color" /> diff --git a/app/src/main/res/layout-land/profile_chooser_fragment.xml b/app/src/main/res/layout-land/profile_chooser_fragment.xml index 7eedba72455..71ab34ea13a 100644 --- a/app/src/main/res/layout-land/profile_chooser_fragment.xml +++ b/app/src/main/res/layout-land/profile_chooser_fragment.xml @@ -55,7 +55,7 @@ android:layout_marginTop="@dimen/profile_chooser_fragment_profile_select_text_margin_top" android:layout_marginEnd="36dp" android:text="@string/profile_chooser_select" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout-land/profile_chooser_profile_view.xml b/app/src/main/res/layout-land/profile_chooser_profile_view.xml index 82f0f8c9ba4..fbde061e2b1 100644 --- a/app/src/main/res/layout-land/profile_chooser_profile_view.xml +++ b/app/src/main/res/layout-land/profile_chooser_profile_view.xml @@ -60,14 +60,14 @@ android:maxLines="2" android:singleLine="false" android:text="@{viewModel.profile.name}" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" /> + android:textColor="@color/component_color_shared_secondary_4_text_color" /> @@ -77,7 +77,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/profile_chooser_admin" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" android:visibility="@{viewModel.profile.isAdmin ? View.VISIBLE : View.GONE}" /> diff --git a/app/src/main/res/layout-sw600dp-land/profile_chooser_profile_view.xml b/app/src/main/res/layout-sw600dp-land/profile_chooser_profile_view.xml index 9a6ae549beb..f70c2bbf2fa 100644 --- a/app/src/main/res/layout-sw600dp-land/profile_chooser_profile_view.xml +++ b/app/src/main/res/layout-sw600dp-land/profile_chooser_profile_view.xml @@ -68,7 +68,7 @@ android:maxLines="2" android:singleLine="false" android:text="@{viewModel.profile.name}" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/profile_chooser_profile_view_name_margin_top_profile_already_added : @dimen/space_0dp}" /> @@ -91,7 +91,7 @@ android:layout_marginTop="4dp" android:gravity="@{hasProfileEverBeenAddedValue ? Gravity.CENTER_HORIZONTAL : Gravity.CENTER_VERTICAL}" android:text="@string/profile_chooser_admin" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" android:visibility="@{viewModel.profile.isAdmin ? View.VISIBLE : View.GONE}" app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/profile_chooser_profile_view_is_admin_margin_top_profile_already_added : @dimen/space_0dp}" /> diff --git a/app/src/main/res/layout-sw600dp-land/topic_lessons_story_summary.xml b/app/src/main/res/layout-sw600dp-land/topic_lessons_story_summary.xml index 83adf6e3eaf..b4467458dcd 100644 --- a/app/src/main/res/layout-sw600dp-land/topic_lessons_story_summary.xml +++ b/app/src/main/res/layout-sw600dp-land/topic_lessons_story_summary.xml @@ -146,7 +146,7 @@ app:isRotationAnimationClockwise="@{isListExpanded}" app:rotationAnimationAngle="@{180f}" app:srcCompat="@drawable/ic_arrow_drop_down_black_24dp" - app:tint="@color/component_color_lessons_tab_activity_lesson_card_drop_down_arrow_color" /> + app:tint="@color/component_color_shared_multipane_icon_color" /> diff --git a/app/src/main/res/layout-sw600dp-port/profile_chooser_profile_view.xml b/app/src/main/res/layout-sw600dp-port/profile_chooser_profile_view.xml index 456486f4ab7..1b6f2b142f8 100644 --- a/app/src/main/res/layout-sw600dp-port/profile_chooser_profile_view.xml +++ b/app/src/main/res/layout-sw600dp-port/profile_chooser_profile_view.xml @@ -68,7 +68,7 @@ android:maxLines="2" android:singleLine="false" android:text="@{viewModel.profile.name}" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/profile_chooser_profile_view_name_margin_top_profile_already_added : @dimen/space_0dp}" /> @@ -79,7 +79,7 @@ android:layout_height="wrap_content" android:layout_marginTop="4dp" android:gravity="@{hasProfileEverBeenAddedValue ? Gravity.CENTER_HORIZONTAL : Gravity.CENTER_VERTICAL}" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" android:visibility="@{viewModel.profile.lastLoggedInTimestampMs > 0 ? View.VISIBLE : View.GONE}" profile:lastVisited="@{viewModel.profile.lastLoggedInTimestampMs}" /> @@ -91,7 +91,7 @@ android:layout_marginTop="4dp" android:gravity="@{hasProfileEverBeenAddedValue ? Gravity.CENTER_HORIZONTAL : Gravity.CENTER_VERTICAL}" android:text="@string/profile_chooser_admin" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" android:visibility="@{viewModel.profile.isAdmin ? View.VISIBLE : View.GONE}" /> diff --git a/app/src/main/res/layout-sw600dp/profile_chooser_fragment.xml b/app/src/main/res/layout-sw600dp/profile_chooser_fragment.xml index 55f07860bbe..a6ac88ce249 100644 --- a/app/src/main/res/layout-sw600dp/profile_chooser_fragment.xml +++ b/app/src/main/res/layout-sw600dp/profile_chooser_fragment.xml @@ -60,7 +60,7 @@ android:layout_marginTop="80dp" android:fontFamily="sans-serif" android:text="@string/profile_chooser_select" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" android:textSize="36sp" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout/profile_chooser_fragment.xml b/app/src/main/res/layout/profile_chooser_fragment.xml index d49e7676114..febeed2e886 100644 --- a/app/src/main/res/layout/profile_chooser_fragment.xml +++ b/app/src/main/res/layout/profile_chooser_fragment.xml @@ -55,7 +55,7 @@ android:layout_marginTop="@dimen/profile_chooser_fragment_profile_select_text_margin_top" android:layout_marginEnd="36dp" android:text="@string/profile_chooser_select" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> diff --git a/app/src/main/res/layout/profile_chooser_profile_view.xml b/app/src/main/res/layout/profile_chooser_profile_view.xml index 37b6e19c07d..9490c68c6ca 100644 --- a/app/src/main/res/layout/profile_chooser_profile_view.xml +++ b/app/src/main/res/layout/profile_chooser_profile_view.xml @@ -63,7 +63,7 @@ android:maxLines="2" android:singleLine="false" android:text="@{viewModel.profile.name}" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" app:layoutMarginTop="@{hasProfileEverBeenAddedValue ? @dimen/profile_chooser_profile_view_name_margin_top_profile_already_added : @dimen/space_0dp}" /> @@ -85,7 +85,7 @@ android:layout_marginTop="@dimen/profile_chooser_profile_view_is_admin_margin_top" android:gravity="@{hasProfileEverBeenAddedValue ? Gravity.CENTER_HORIZONTAL : Gravity.CENTER_VERTICAL}" android:text="@string/profile_chooser_admin" - android:textColor="@color/component_color_profile_chooser_activity_white_text_color" + android:textColor="@color/component_color_shared_secondary_4_text_color" android:visibility="@{viewModel.profile.isAdmin ? View.VISIBLE : View.GONE}" /> diff --git a/app/src/main/res/layout/topic_lessons_story_summary.xml b/app/src/main/res/layout/topic_lessons_story_summary.xml index 2ff257e9a00..c5c9db0f973 100644 --- a/app/src/main/res/layout/topic_lessons_story_summary.xml +++ b/app/src/main/res/layout/topic_lessons_story_summary.xml @@ -143,7 +143,7 @@ app:isRotationAnimationClockwise="@{isListExpanded}" app:rotationAnimationAngle="@{180f}" app:srcCompat="@drawable/ic_arrow_drop_down_black_24dp" - app:tint="@color/component_color_lessons_tab_activity_lesson_card_drop_down_arrow_color" /> + app:tint="@color/component_color_shared_multipane_icon_color" /> diff --git a/app/src/main/res/values-night/color_palette.xml b/app/src/main/res/values-night/color_palette.xml index 7cc02d399cc..c630a85bb8e 100644 --- a/app/src/main/res/values-night/color_palette.xml +++ b/app/src/main/res/values-night/color_palette.xml @@ -137,6 +137,8 @@ @color/color_def_oppia_metallic_blue @color/color_def_dark_purple @color/color_def_catalina_blue + @color/color_def_stroke_silver + @color/color_def_radio_green @color/color_def_oppia_light_black @color/color_def_oppia_light_black @color/color_def_oppia_light_black diff --git a/app/src/main/res/values/color_defs.xml b/app/src/main/res/values/color_defs.xml index 2db1f9a10ae..bf6725b41bc 100644 --- a/app/src/main/res/values/color_defs.xml +++ b/app/src/main/res/values/color_defs.xml @@ -77,6 +77,7 @@ #00C7B6 #E5E5E5 #008577 + #00A89F #777777 #F7F7F7 #DCDCDC diff --git a/app/src/main/res/values/color_palette.xml b/app/src/main/res/values/color_palette.xml index 0a6b88639be..f07c4439850 100644 --- a/app/src/main/res/values/color_palette.xml +++ b/app/src/main/res/values/color_palette.xml @@ -139,6 +139,8 @@ @color/color_def_teal_blue @color/color_def_oppia_reddish_brown @color/color_def_catalina_blue + @color/color_def_black_54 + @color/color_def_radio_green @color/color_def_oppia_white @color/color_def_oppia_green @color/color_def_white diff --git a/app/src/main/res/values/component_colors.xml b/app/src/main/res/values/component_colors.xml index 7bf44361653..7add898a2bf 100644 --- a/app/src/main/res/values/component_colors.xml +++ b/app/src/main/res/values/component_colors.xml @@ -105,6 +105,8 @@ @color/color_palette_helper_text_color @color/color_palette_stroke_color @color/color_palette_hint_dialog_status_bar_color + @color/color_palette_shared_radio_button_unchecked_color + @color/color_palette_shared_radio_button_checked_color @color/color_palette_info_icon_color @color/color_palette_description_text_color @@ -148,7 +150,6 @@ @color/color_palette_primary_container_background_color @color/color_palette_transparent_background_color - @color/color_palette_lesson_card_drop_down_arrow_color @color/color_palette_lesson_card_dashed_divider_color @color/color_palette_lesson_in_progress_chapter_index_background_color @color/color_palette_lesson_in_progress_chapter_name_background_color @@ -224,6 +225,5 @@ @color/color_palette_profile_chooser_charcoal_black_background_color @color/color_palette_profile_chooser_silver_text_color - @color/color_palette_profile_chooser_white_text_color @color/color_palette_profile_chooser_avatar_border_color