Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #4192 : Added dark mode support to MarkChaptersCompletedActivity, MarkStoriesCompletedActivity and MarkTopicsCompletedActivity #4442

Merged
merged 2 commits into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/src/main/res/color/checkbox_text_color.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/oppia_primary_text"
<item android:color="@color/component_color_mark_chapters_completed_checkbox_text_unselected_state_color"
android:alpha="0.38"
android:state_checked="false"
android:state_enabled="false"/>
<item android:color="@color/oppia_primary_text"
<item android:color="@color/component_color_mark_chapters_completed_checkbox_text_unselected_state_color"
android:state_enabled="true"
android:state_checked="false"/>
<item android:color="@color/oppia_primary_text"
<item android:color="@color/component_color_mark_chapters_completed_checkbox_text_selected_state_color"
android:state_checked="true"/>
</selector>
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/ic_check_box_checked.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<vector android:height="24dp" android:tint="#008577"
<vector android:height="24dp" android:tint="@color/component_color_mark_chapters_completed_checkbox_selected_state_color"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M19,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.11,0 2,-0.9 2,-2L21,5c0,-1.1 -0.89,-2 -2,-2zM10,17l-5,-5 1.41,-1.41L10,14.17l7.59,-7.59L19,8l-9,9z"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:id="@+id/mark_chapters_completed_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/oppia_primary"
android:background="@color/component_color_mark_chapters_completed_primary_toolbar_color"
android:textSize="20sp"
app:navigationContentDescription="@string/navigate_up"
app:navigationIcon="?attr/homeAsUpIndicator"
Expand All @@ -44,7 +44,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/oppia_primary">
android:background="@color/component_color_mark_chapters_completed_secondary_toolbar_color">
rt4914 marked this conversation as resolved.
Show resolved Hide resolved

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/mark_chapters_completed_all_check_box_container"
Expand Down Expand Up @@ -112,7 +112,7 @@
android:id="@+id/mark_chapters_completed_recycler_view"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/profile_edit_background"
android:background="@color/component_color_mark_chapters_completed_background_color"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingBottom="40dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
android:id="@+id/mark_chapters_completed_story_name_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_mark_chapters_completed_subtext_heading_background_color"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@{viewModel.storyName}"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/component_color_mark_chapters_completed_subtext_heading_color"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/mark_stories_completed_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:id="@+id/mark_stories_completed_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/oppia_primary"
android:background="@color/component_color_mark_stories_completed_primary_toolbar_color"
android:textSize="20sp"
app:navigationContentDescription="@string/navigate_up"
app:navigationIcon="?attr/homeAsUpIndicator"
Expand All @@ -44,7 +44,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/oppia_primary">
android:background="@color/component_color_mark_stories_completed_secondary_toolbar_color">
rt4914 marked this conversation as resolved.
Show resolved Hide resolved

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/mark_stories_completed_all_check_box_container"
Expand Down Expand Up @@ -112,7 +112,7 @@
android:id="@+id/mark_stories_completed_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/profile_edit_background"
android:background="@color/component_color_mark_stories_completed_background_color"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingVertical="40dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:paddingBottom="26dp"
android:text="@{viewModel.storySummary.storyName}"
android:textAlignment="viewStart"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/checkbox_text_color"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/mark_topics_completed_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:id="@+id/mark_topics_completed_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/oppia_primary"
android:background="@color/component_color_mark_topics_completed_primary_toolbar_color"
android:textSize="20sp"
app:navigationContentDescription="@string/navigate_up"
app:navigationIcon="?attr/homeAsUpIndicator"
Expand All @@ -44,7 +44,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/oppia_primary">
android:background="@color/component_color_mark_topics_completed_secondary_toolbar_color">
rt4914 marked this conversation as resolved.
Show resolved Hide resolved

<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/mark_topics_completed_all_check_box_container"
Expand Down Expand Up @@ -112,7 +112,7 @@
android:id="@+id/mark_topics_completed_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/profile_edit_background"
android:background="@color/component_color_mark_topics_completed_background_color"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingVertical="40dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:paddingBottom="26dp"
android:text="@{viewModel.topic.name}"
android:textAlignment="viewStart"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/checkbox_text_color"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values-night/color_palette.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,8 @@
<color name="color_palette_progress_bar_gradient_center_color">@color/color_def_dark_mode_question_player_progress_bar_gradient_center</color>
<color name="color_palette_progress_bar_gradient_end_color">@color/color_def_dark_mode_question_player_progress_bar_gradient_end</color>
<color name="color_palette_submit_text_active_color">@color/color_def_white</color>
<color name="color_palette_mark_chapters_background_color">@color/color_def_oppia_light_black</color>
<color name="color_palette_checkbox_text_unselected_state_color">@color/color_def_white</color>
<color name="color_palette_checkbox_text_selected_state_color">@color/color_def_oppia_turquoise</color>
<color name="color_palette_checkbox_selected_state_color">@color/color_def_oppia_turquoise</color>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/color_defs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,6 @@
<color name="color_def_dark_mode_question_player_progress_bar_gradient_start">#23272A00</color>
<color name="color_def_dark_mode_question_player_progress_bar_gradient_center">#23272A</color>
<color name="color_def_dark_mode_question_player_progress_bar_gradient_end">#00C7B6</color>
<color name="color_def_whitish_grey">#E5E5E5</color>
<color name="color_def_checkbox_green">#008577</color>
</resources>
4 changes: 4 additions & 0 deletions app/src/main/res/values/color_palette.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,8 @@
<color name="color_palette_progress_bar_gradient_center_color">@color/color_def_question_player_progress_bar_gradient_center</color>
<color name="color_palette_progress_bar_gradient_end_color">@color/color_def_question_player_progress_bar_gradient_end</color>
<color name="color_palette_submit_text_active_color">@color/color_def_white</color>
<color name="color_palette_mark_chapters_background_color">@color/color_def_whitish_grey</color>
<color name="color_palette_checkbox_text_unselected_state_color">@color/color_def_accessible_grey</color>
<color name="color_palette_checkbox_text_selected_state_color">@color/color_def_accessible_grey</color>
<color name="color_palette_checkbox_selected_state_color">@color/color_def_checkbox_green</color>
</resources>
17 changes: 17 additions & 0 deletions app/src/main/res/values/component_colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,21 @@
<color name="component_color_math_expression_parser_activity_radio_buttons_color">@color/color_palette_dark_text_color</color>
<color name="component_color_math_expression_parser_activity_edit_text_color">@color/color_palette_dark_text_color</color>
<color name="component_color_math_expression_parser_activity_hint_text_color">@color/color_palette_hint_text_color</color>
<!-- Mark Chapters Completed Activity -->
<color name="component_color_mark_chapters_completed_primary_toolbar_color">@color/color_palette_toolbar_color</color>
<color name="component_color_mark_chapters_completed_secondary_toolbar_color">@color/color_palette_secondary_toolbar_color</color>
<color name="component_color_mark_chapters_completed_background_color">@color/color_palette_mark_chapters_background_color</color>
<color name="component_color_mark_chapters_completed_checkbox_text_unselected_state_color">@color/color_palette_checkbox_text_unselected_state_color</color>
<color name="component_color_mark_chapters_completed_checkbox_text_selected_state_color">@color/color_palette_checkbox_text_selected_state_color</color>
<color name="component_color_mark_chapters_completed_checkbox_selected_state_color">@color/color_palette_checkbox_selected_state_color</color>
<color name="component_color_mark_chapters_completed_subtext_heading_background_color">@color/color_palette_container_background_color</color>
<color name="component_color_mark_chapters_completed_subtext_heading_color">@color/color_palette_highlighted_text_color</color>
<!-- Mark Stories Completed Activity -->
<color name="component_color_mark_stories_completed_primary_toolbar_color">@color/color_palette_toolbar_color</color>
<color name="component_color_mark_stories_completed_secondary_toolbar_color">@color/color_palette_secondary_toolbar_color</color>
<color name="component_color_mark_stories_completed_background_color">@color/color_palette_mark_chapters_background_color</color>
<!-- Mark Topics Completed Activity -->
<color name="component_color_mark_topics_completed_primary_toolbar_color">@color/color_palette_toolbar_color</color>
<color name="component_color_mark_topics_completed_secondary_toolbar_color">@color/color_palette_secondary_toolbar_color</color>
<color name="component_color_mark_topics_completed_background_color">@color/color_palette_mark_chapters_background_color</color>
</resources>