From 49a6c32bc265cc49b00a9cc93b0d1aafe046a28c Mon Sep 17 00:00:00 2001 From: MOHIT GUPTA <76530270+MohitGupta121@users.noreply.github.com> Date: Mon, 30 Jan 2023 21:13:11 +0530 Subject: [PATCH] Fixed #4861 : Dark Mode for SpotLight Overlays (#4863) ## Explanation Fixed #4861 : Dark Mode for SpotLight Overlays ## 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: ...".) - [ ] 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 ### Spotlight Overlays 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 --- .../res/drawable/spotlight_done_button_background.xml | 2 +- .../main/res/drawable/spotlight_hint_text_background.xml | 2 +- app/src/main/res/layout/bottom_left_overlay.xml | 9 ++++++--- app/src/main/res/layout/bottom_right_overlay.xml | 9 ++++++--- app/src/main/res/layout/top_left_overlay.xml | 9 ++++++--- app/src/main/res/layout/top_right_overlay.xml | 9 ++++++--- app/src/main/res/values-night/color_palette.xml | 4 ++++ app/src/main/res/values/color_palette.xml | 4 ++++ app/src/main/res/values/component_colors.xml | 4 ++++ 9 files changed, 38 insertions(+), 14 deletions(-) diff --git a/app/src/main/res/drawable/spotlight_done_button_background.xml b/app/src/main/res/drawable/spotlight_done_button_background.xml index 8cb2452157e..96b6ff9e767 100644 --- a/app/src/main/res/drawable/spotlight_done_button_background.xml +++ b/app/src/main/res/drawable/spotlight_done_button_background.xml @@ -1,5 +1,5 @@ - + diff --git a/app/src/main/res/drawable/spotlight_hint_text_background.xml b/app/src/main/res/drawable/spotlight_hint_text_background.xml index cfa84f27751..df855c8f311 100644 --- a/app/src/main/res/drawable/spotlight_hint_text_background.xml +++ b/app/src/main/res/drawable/spotlight_hint_text_background.xml @@ -6,5 +6,5 @@ android:bottomRightRadius="5dp" android:topLeftRadius="5dp" android:topRightRadius="5dp" /> - + diff --git a/app/src/main/res/layout/bottom_left_overlay.xml b/app/src/main/res/layout/bottom_left_overlay.xml index 820a9fb32af..fd54dfb04a8 100644 --- a/app/src/main/res/layout/bottom_left_overlay.xml +++ b/app/src/main/res/layout/bottom_left_overlay.xml @@ -24,7 +24,8 @@ android:rotationX="180" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/ic_rounded_arrow_up_right" /> + app:srcCompat="@drawable/ic_rounded_arrow_up_right" + app:tint="@color/component_color_shared_spotlight_overlay_arrow_color" /> + android:background="@color/component_color_shared_spotlight_hint_background_color"> + app:srcCompat="@drawable/ic_close_black_24" + app:tint="@color/component_color_shared_close_spotlight_button_color" /> diff --git a/app/src/main/res/layout/bottom_right_overlay.xml b/app/src/main/res/layout/bottom_right_overlay.xml index 836e1850e76..d93caa2ad2c 100644 --- a/app/src/main/res/layout/bottom_right_overlay.xml +++ b/app/src/main/res/layout/bottom_right_overlay.xml @@ -25,7 +25,8 @@ android:rotationY="180" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/ic_rounded_arrow_up_right" /> + app:srcCompat="@drawable/ic_rounded_arrow_up_right" + app:tint="@color/component_color_shared_spotlight_overlay_arrow_color" /> + android:background="@color/component_color_shared_spotlight_hint_background_color"> + app:srcCompat="@drawable/ic_close_black_24" + app:tint="@color/component_color_shared_close_spotlight_button_color" /> diff --git a/app/src/main/res/layout/top_left_overlay.xml b/app/src/main/res/layout/top_left_overlay.xml index 106668891e3..fba00994436 100644 --- a/app/src/main/res/layout/top_left_overlay.xml +++ b/app/src/main/res/layout/top_left_overlay.xml @@ -23,7 +23,8 @@ android:layout_height="@dimen/spotlight_arrow_height" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/ic_rounded_arrow_up_right" /> + app:srcCompat="@drawable/ic_rounded_arrow_up_right" + app:tint="@color/component_color_shared_spotlight_overlay_arrow_color" /> + android:background="@color/component_color_shared_spotlight_hint_background_color"> + app:srcCompat="@drawable/ic_close_black_24" + app:tint="@color/component_color_shared_close_spotlight_button_color" /> diff --git a/app/src/main/res/layout/top_right_overlay.xml b/app/src/main/res/layout/top_right_overlay.xml index 9f0d00a535f..13d17e7c942 100644 --- a/app/src/main/res/layout/top_right_overlay.xml +++ b/app/src/main/res/layout/top_right_overlay.xml @@ -24,7 +24,8 @@ android:rotationY="180" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:srcCompat="@drawable/ic_rounded_arrow_up_right" /> + app:srcCompat="@drawable/ic_rounded_arrow_up_right" + app:tint="@color/component_color_shared_spotlight_overlay_arrow_color" /> + android:background="@color/component_color_shared_spotlight_hint_background_color"> + app:srcCompat="@drawable/ic_close_black_24" + app:tint="@color/component_color_shared_close_spotlight_button_color" /> diff --git a/app/src/main/res/values-night/color_palette.xml b/app/src/main/res/values-night/color_palette.xml index 230386dc464..6f472642c41 100644 --- a/app/src/main/res/values-night/color_palette.xml +++ b/app/src/main/res/values-night/color_palette.xml @@ -5,6 +5,7 @@ @color/color_def_oppia_metallic_blue @color/color_def_white @color/color_def_white + @color/color_def_black @color/color_def_white @color/color_def_oppia_light_black @color/color_def_oppia_light_black @@ -187,4 +188,7 @@ @color/color_def_light_grey @color/color_def_columbia_blue @color/color_def_japanese_indigo + @color/color_def_oppia_light_yellow + @color/color_def_black + @color/color_def_white diff --git a/app/src/main/res/values/color_palette.xml b/app/src/main/res/values/color_palette.xml index 4ad324d81bd..c1b937eb81c 100644 --- a/app/src/main/res/values/color_palette.xml +++ b/app/src/main/res/values/color_palette.xml @@ -5,6 +5,7 @@ @color/color_def_oppia_dark_blue @color/color_def_accessible_grey @color/color_def_white + @color/color_def_black @color/color_def_accessible_grey @color/color_def_accessible_grey @color/color_def_oppia_light_yellow @@ -190,4 +191,7 @@ @color/color_def_light_grey @color/color_def_columbia_blue @color/color_def_japanese_indigo + @color/color_def_oppia_light_yellow + @color/color_def_black + @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 4806ae40106..f403636349e 100644 --- a/app/src/main/res/values/component_colors.xml +++ b/app/src/main/res/values/component_colors.xml @@ -84,6 +84,9 @@ @color/color_palette_icon_white_color @color/color_palette_icon_color @color/color_palette_shared_resume_lesson_start_over_button_color + @color/color_palette_shared_spotlight_hint_background_color + @color/color_palette_shared_close_spotlight_button_color + @color/color_palette_shared_spotlight_overlay_arrow_color @color/color_palette_status_bar_color @color/color_palette_fragment_status_bar_color @@ -100,6 +103,7 @@ @color/color_palette_link_text_color @color/color_palette_primary_color @color/color_palette_white_text_color + @color/color_palette_black_text_color @color/color_palette_primary_text_color @color/color_palette_primary_text_color @color/color_palette_primary_text_color