Skip to content

Commit

Permalink
Fixes #4191: Added dark mode support to DeveloperOptionsActivity, Vie…
Browse files Browse the repository at this point in the history
…wEventsLogsActivity and ForceNetworkTypeActivity (#4308)

* added dark mode to DevloperOptionsActivity, ViewEventsLogsActivity and ForceNetworkTypeActivity

* added dark mode to MathExpressions/Equations activity

* renamed  color_def_accessible_light_grey_100 to color_def_accessible_light_grey_2 and removed extra blank line from component_colors.xml

* added extra line in the end of component_colors.xml

* renamed all view_events_logs_activity to view_event_logs_activity

* removed an extra spacing
  • Loading branch information
Akshatkamboj14 authored Jun 1, 2022
1 parent 107c6ed commit 517964c
Show file tree
Hide file tree
Showing 14 changed files with 93 additions and 49 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/layout/developer_options_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:id="@+id/developer_options_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_mid_grey_30"
android:background="@color/component_color_developer_options_activity_background_color"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingBottom="80dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
android:id="@+id/modify_lesson_progress_text_view"
style="@style/Heading5ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_mid_grey_30"
android:background="@color/component_color_developer_options_activity_sub_heading_background_color"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_modify_lesson_progress_label"
android:textColor="@color/oppia_primary"
android:textColor="@color/component_color_developer_options_activity_sub_heading_color"
app:layout_constraintBottom_toTopOf="@id/mark_chapters_completed_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -33,14 +33,14 @@
android:id="@+id/mark_chapters_completed_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_developer_options_activity_options_background_color"
android:onClick="@{(v) -> viewModel.onMarkChaptersCompletedClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_mark_chapters_completed"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/component_color_developer_options_activity_menu_options_text_color"
app:layout_constraintBottom_toTopOf="@id/view_divider1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -50,7 +50,7 @@
android:id="@+id/view_divider1"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@color/color_def_mid_grey_30"
android:background="@color/component_color_developer_options_activity_view_divider_color"
app:layout_constraintBottom_toTopOf="@id/mark_stories_completed_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -60,14 +60,14 @@
android:id="@+id/mark_stories_completed_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_developer_options_activity_options_background_color"
android:onClick="@{(v) -> viewModel.onMarkStoriesCompletedClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_mark_stories_completed"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/component_color_developer_options_activity_menu_options_text_color"
app:layout_constraintBottom_toTopOf="@id/mark_topics_completed_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -77,7 +77,7 @@
android:id="@+id/view_divider2"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@color/color_def_mid_grey_30"
android:background="@color/component_color_developer_options_activity_view_divider_color"
app:layout_constraintBottom_toTopOf="@id/mark_topics_completed_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -87,14 +87,14 @@
android:id="@+id/mark_topics_completed_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_developer_options_activity_options_background_color"
android:onClick="@{(v) -> viewModel.onMarkTopicsCompletedClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_mark_topics_completed"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/component_color_developer_options_activity_menu_options_text_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
android:id="@+id/override_app_behaviors_text_view"
style="@style/Heading5ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_mid_grey_30"
android:background="@color/component_color_developer_options_activity_sub_heading_background_color"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_override_app_behaviors_label"
android:textColor="@color/oppia_primary"
android:textColor="@color/component_color_developer_options_activity_sub_heading_color"
app:layout_constraintBottom_toTopOf="@id/show_all_hints_solution_constraint_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -33,7 +33,7 @@
android:id="@+id/show_all_hints_solution_constraint_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_def_white"
android:background="@color/component_color_developer_options_activity_options_background_color"
android:onClick="@{(v) -> viewModel.onShowAllHintsAndSolutionClicked()}"
android:paddingStart="16dp"
android:paddingTop="10dp"
Expand All @@ -48,9 +48,9 @@
android:id="@+id/show_all_hints_solution_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="0dp"
android:background="@color/color_def_white"
android:background="@color/component_color_developer_options_activity_options_background_color"
android:text="@string/developer_options_show_all_hints_solution"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/component_color_developer_options_activity_menu_options_text_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/show_all_hints_solution_switch"
app:layout_constraintStart_toStartOf="parent"
Expand Down Expand Up @@ -78,7 +78,7 @@
android:id="@+id/view_divider1"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@color/color_def_mid_grey_30"
android:background="@color/component_color_developer_options_activity_view_divider_color"
app:layout_constraintBottom_toTopOf="@id/force_network_type_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -88,14 +88,14 @@
android:id="@+id/force_network_type_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_developer_options_activity_options_background_color"
android:onClick="@{(v) -> viewModel.onForceNetworkTypeClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_force_network_type"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/component_color_developer_options_activity_menu_options_text_color"
app:layout_constraintBottom_toTopOf="@id/view_divider2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -105,7 +105,7 @@
android:id="@+id/view_divider2"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@color/color_def_mid_grey_30"
android:background="@color/component_color_developer_options_activity_view_divider_color"
app:layout_constraintBottom_toTopOf="@id/force_crash_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -115,14 +115,14 @@
android:id="@+id/force_crash_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_developer_options_activity_options_background_color"
android:onClick="@{(v) -> viewModel.onForceCrashClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_force_crash"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/component_color_developer_options_activity_menu_options_text_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@
android:id="@+id/debug_parsers_text_view"
style="@style/Heading5ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_mid_grey_30"
android:background="@color/component_color_developer_options_activity_sub_heading_background_color"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_test_parsers_label"
android:textColor="@color/oppia_primary" />
android:textColor="@color/component_color_developer_options_activity_sub_heading_color" />

<TextView
android:id="@+id/math_expressions_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_developer_options_activity_options_background_color"
android:onClick="@{(v) -> viewModel.onMathExpressionsClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_math_expressions"
android:textColor="@color/oppia_primary_text_dark" />
android:textColor="@color/component_color_developer_options_activity_menu_options_text_color" />

</LinearLayout>
</layout>
8 changes: 4 additions & 4 deletions app/src/main/res/layout/developer_options_view_logs_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
android:id="@+id/view_logs_text_view"
style="@style/Heading5ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_mid_grey_30"
android:background="@color/component_color_developer_options_activity_sub_heading_background_color"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_view_logs_label"
android:textColor="@color/oppia_primary"
android:textColor="@color/component_color_developer_options_activity_sub_heading_color"
app:layout_constraintBottom_toTopOf="@id/event_logs_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -33,14 +33,14 @@
android:id="@+id/event_logs_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_developer_options_activity_options_background_color"
android:onClick="@{(v) -> viewModel.onEventLogsClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/developer_options_event_logs"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/component_color_developer_options_activity_menu_options_text_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/force_network_type_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
list="@{viewModel.networkTypeList}"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/profile_edit_background"
android:background="@color/component_color_force_network_type_activity_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 @@ -24,13 +24,13 @@
android:id="@+id/network_type_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_force_network_type_activity_options_background_color"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@{viewModel.networkTypeString}"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/component_color_force_network_type_activity_menu_options_text_color"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
Expand All @@ -52,7 +52,7 @@
android:id="@+id/view_divider"
android:layout_width="match_parent"
android:layout_height="2dp"
android:background="@color/color_def_mid_grey_30"
android:background="@color/component_color_force_network_type_activity_view_divider_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
Loading

0 comments on commit 517964c

Please sign in to comment.