Skip to content

Commit

Permalink
Fix part of #4030 : Implementing dark mode to various screens. (#4032)
Browse files Browse the repository at this point in the history
* updated till line 10

* line 16

* updated till line 42

* ...

* done

* fixed unresolved reference for highlighterDeveloperOptionsNavMenuItem

* highlightedNavMenuItem

* renamed colors.xml to color_defs.xml

* added basic colors

* resolving merge conflict

* resolved merge conflict

* working on add profile activity

* using style/TextInputLayout to change boxBackground

* updated color for edit text cursor

* added color under toolbar and removing generic colors from component_color.xml

* fixed namings of new colors in color_defs.xml

* renamed oppia_heading_text_color

* fixing color naming in component_colors.xml and color_palette.xml

* fixing naming in component_colors.xml and color_palette.xml

* fixing naming in component_colors.xml and color_palette.xml

* fixed namings in component_colors.xml and color_palette.xml

* resolved merge conflict

* admin_auth_activity

* working on admin_pin_activity

* fixed color for TextInputLayout

* changed administrator_controls

* changed statusBar color

* fixed action bar color in OppiaTheme

* nit changes

* renamed heading_text_color

* made requested changes

* replaced label_text_color with more specific component colors

* restructuring component_colors restricting colors to their activities/views

* renamed colors in component_colors.xml

* fixed toolbar and statusbar colors in component_colors.xml

* renamed newly added colors in color_defs

* introduced colors_migrating.xml

* shifted accessible grey to colors_migrating.xml

* reverted last commit

* Added comment for colors_migrating.xml

* added myself as CODEOWNER of colors_migrating.xml

* requested nit changes

* renamed admin_highlighted in admin_controls

* added shared_ prefix to name of shared component_colors

* renamed component_colors

* nit changes

* nit changes

* used color_defs for color_palette instead of colors_migrating

* added TODO in colors_migrating.xml

* removed direct references to color_defs from component_colors.xml for static colors
  • Loading branch information
ayush0402 authored Feb 7, 2022
1 parent 8de2273 commit bbd45fa
Show file tree
Hide file tree
Showing 39 changed files with 361 additions and 238 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ gradlew.bat @BenHenning
# All resource files.
/app/src/main/res/**/*.xml @rt4914
/utility/src/main/res/**/*.xml @rt4914
/app/src/main/res/values/colors_migrating.xml @ayush0402 @rt4914

# App UI strings.
/app/src/main/res/values*/strings.xml @BenHenning
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/drawable/color_cursor.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size android:width="0.5dp" />
<solid android:color="@color/oppia_primary_text" />
<solid android:color="@color/shared_edit_text_cursor_color" />
</shape>
6 changes: 3 additions & 3 deletions app/src/main/res/layout-land/admin_auth_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:id="@+id/admin_auth_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/add_profile_background">
android:background="@color/admin_auth_layout_background_color">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/admin_auth_app_bar_layout"
Expand All @@ -28,7 +28,7 @@
android:id="@+id/admin_auth_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:background="@color/admin_auth_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
app:navigationContentDescription="@string/admin_auth_close"
Expand Down Expand Up @@ -80,7 +80,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/admin_auth_sub"
android:textColor="@color/oppia_admin_auth_secondary_text"
android:textColor="@color/admin_auth_secondary_text_color"
app:layout_constraintEnd_toEndOf="@+id/admin_auth_heading_textview"
app:layout_constraintStart_toStartOf="@+id/admin_auth_heading_textview"
app:layout_constraintTop_toBottomOf="@id/admin_auth_heading_textview" />
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout-land/admin_pin_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
android:id="@+id/admin_auth_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oppia_background_yellow_ivory"
android:background="@color/admin_pin_activity_layout_background_color"
android:paddingBottom="108dp">

<View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_account_actions_label"
android:textColor="@color/oppia_primary"
android:textColor="@color/admin_controls_sub_heading_color"
app:layout_constraintBottom_toTopOf="@id/log_out_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -33,14 +33,14 @@
android:id="@+id/log_out_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:onClick="@{(v) -> viewModel.onLogOutClicked()}"
android:paddingStart="36dp"
android:paddingTop="20dp"
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_log_out"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/admin_controls_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 @@ -23,7 +23,7 @@
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_app_information_label"
android:textColor="@color/oppia_primary"
android:textColor="@color/admin_controls_sub_heading_color"
app:layout_constraintBottom_toTopOf="@id/app_version_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -33,14 +33,14 @@
android:id="@+id/app_version_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:onClick="@{(v) -> viewModel.onAppVersionClicked()}"
android:paddingStart="36dp"
android:paddingTop="20dp"
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_app_version"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/admin_controls_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 @@ -23,7 +23,7 @@
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_download_permissions_label"
android:textColor="@color/oppia_primary"
android:textColor="@color/admin_controls_sub_heading_color"
app:layout_constraintBottom_toTopOf="@id/topic_update_on_wifi_constraint_layout"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -33,7 +33,7 @@
android:id="@+id/topic_update_on_wifi_constraint_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:clickable="true"
android:focusable="true"
android:importantForAccessibility="yes"
Expand All @@ -50,20 +50,20 @@
<TextView
android:id="@+id/topic_update_on_wifi_title_text_view"
style="@style/Body"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:paddingBottom="4dp"
android:text="@string/administrator_controls_update_on_wifi_title"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/admin_controls_menu_options_text_color"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/topic_update_on_wifi_description_text_view"
style="@style/Subtitle2ViewStart"
android:layout_width="0dp"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:text="@string/administrator_controls_update_on_wifi_message"
android:textColor="@color/accessible_light_grey"
android:textColor="@color/admin_controls_switch_description_color"
app:layout_constraintEnd_toStartOf="@id/topic_update_on_wifi_switch"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/topic_update_on_wifi_title_text_view" />
Expand Down Expand Up @@ -99,7 +99,7 @@
android:id="@+id/auto_update_topic_constraint_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:clickable="true"
android:focusable="true"
android:importantForAccessibility="yes"
Expand All @@ -116,20 +116,20 @@
<TextView
android:id="@+id/auto_update_topic_title_text_view"
style="@style/Body"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:paddingBottom="4dp"
android:text="@string/administrator_controls_auto_update_title"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/admin_controls_menu_options_text_color"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<TextView
android:id="@+id/auto_update_topic_description_text_view"
style="@style/Subtitle2ViewStart"
android:layout_width="0dp"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:text="@string/administrator_controls_auto_update_message"
android:textColor="@color/accessible_light_grey"
android:textColor="@color/admin_controls_switch_description_color"
app:layout_constraintEnd_toStartOf="@id/auto_update_topic_switch"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toStartOf="parent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:id="@+id/administrator_controls_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/mid_grey_30"
android:background="@color/admin_controls_background_color"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingBottom="108dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_general_label"
android:textColor="@color/oppia_primary"
android:textColor="@color/admin_controls_sub_heading_color"
app:layout_constraintBottom_toTopOf="@id/edit_account_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -33,13 +33,13 @@
android:id="@+id/edit_account_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:paddingStart="36dp"
android:paddingTop="20dp"
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_edit_account"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/admin_controls_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 @@ -23,7 +23,7 @@
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_profile_management_label"
android:textColor="@color/oppia_primary"
android:textColor="@color/admin_controls_sub_heading_color"
app:layout_constraintBottom_toTopOf="@id/edit_profiles_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -33,14 +33,14 @@
android:id="@+id/edit_profiles_text_view"
style="@style/Body"
android:layout_width="match_parent"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:onClick="@{(v) -> viewModel.onEditProfilesClicked()}"
android:paddingStart="36dp"
android:paddingTop="20dp"
android:paddingEnd="36dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_edit_profiles"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/admin_controls_menu_options_text_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout-sw600dp-land/admin_auth_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:id="@+id/admin_auth_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/add_profile_background">
android:background="@color/admin_auth_layout_background_color">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/admin_auth_app_bar_layout"
Expand All @@ -28,7 +28,7 @@
android:id="@+id/admin_auth_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:background="@color/admin_auth_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
app:navigationContentDescription="@string/admin_auth_close"
Expand Down Expand Up @@ -80,7 +80,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/admin_auth_sub"
android:textColor="@color/oppia_admin_auth_secondary_text"
android:textColor="@color/admin_auth_secondary_text_color"
app:layout_constraintEnd_toEndOf="@+id/admin_auth_heading_textview"
app:layout_constraintStart_toStartOf="@+id/admin_auth_heading_textview"
app:layout_constraintTop_toBottomOf="@id/admin_auth_heading_textview" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oppia_background_yellow_ivory"
android:background="@color/admin_pin_activity_layout_background_color"
android:orientation="vertical">

<View
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout-sw600dp-port/admin_auth_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:id="@+id/admin_auth_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/add_profile_background">
android:background="@color/admin_auth_layout_background_color">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/admin_auth_app_bar_layout"
Expand All @@ -28,7 +28,7 @@
android:id="@+id/admin_auth_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:background="@color/admin_auth_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
app:navigationContentDescription="@string/admin_auth_close"
Expand Down Expand Up @@ -71,7 +71,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:text="@string/admin_auth_sub"
android:textColor="@color/oppia_admin_auth_secondary_text"
android:textColor="@color/admin_auth_secondary_text_color"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/admin_auth_heading_textview" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oppia_background_yellow_ivory"
android:background="@color/admin_pin_activity_layout_background_color"
android:orientation="vertical">

<View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_account_actions_label"
android:textColor="@color/oppia_primary"
android:textColor="@color/admin_controls_sub_heading_color"
app:layout_constraintBottom_toTopOf="@id/log_out_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -33,14 +33,14 @@
android:id="@+id/log_out_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@color/white"
android:background="@color/admin_controls_options_background_color"
android:onClick="@{(v) -> viewModel.onLogOutClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_log_out"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/admin_controls_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 @@ -27,7 +27,7 @@
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_app_information_label"
android:textColor="@color/oppia_primary"
android:textColor="@color/admin_controls_sub_heading_color"
app:layout_constraintBottom_toTopOf="@id/app_version_text_view"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -37,14 +37,14 @@
android:id="@+id/app_version_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@{commonViewModel.selectedFragmentIndex == viewModel.itemIndex? @color/admin_highlighted : @color/white}"
android:background="@{commonViewModel.selectedFragmentIndex == viewModel.itemIndex? @color/admin_controls_options_highlighted_background_color : @color/admin_controls_options_background_color}"
android:onClick="@{(v) -> viewModel.onAppVersionClicked()}"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:paddingBottom="20dp"
android:text="@string/administrator_controls_app_version"
android:textColor="@color/oppia_primary_text_dark"
android:textColor="@color/admin_controls_menu_options_text_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand Down
Loading

0 comments on commit bbd45fa

Please sign in to comment.