Skip to content

Commit

Permalink
Fixes #4185: Added Dark Mode for HelpActivity , FaqListActivity , Faq…
Browse files Browse the repository at this point in the history
…SingleActivity (#4245)

* added dark_mode to help and faq

* updated theme

* updated toolbar color

* added toolbar_color to component_colors

* updated color names

* added divider in help_item

* seperated faqlist and faqsingle

* resolved conflicts
  • Loading branch information
bhaktideshmukh authored May 27, 2022
1 parent 9462690 commit 09b3ba1
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 29 deletions.
4 changes: 2 additions & 2 deletions app/src/main/res/layout-sw600dp-land/faq_list_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/general_navigation_background">
android:background="@color/component_color_faq_list_activity_background_color">

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/faq_fragment_recycler_view"
android:layout_width="560dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:background="@color/color_def_white"
android:background="@color/component_color_faq_list_activity_container_background_color"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingBottom="@dimen/faq_list_padding_bottom"
Expand Down
14 changes: 7 additions & 7 deletions app/src/main/res/layout-sw600dp-land/faq_single_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white">
android:background="@color/component_color_faq_single_activity_container_background_color">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/faq_single_app_bar_layout"
Expand All @@ -20,7 +20,7 @@
android:id="@+id/faq_single_activity_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:background="@color/component_color_faq_single_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
app:navigationContentDescription="@string/navigate_up"
Expand All @@ -32,7 +32,7 @@
<FrameLayout
android:layout_width="0dp"
android:layout_height="0dp"
android:background="@color/general_navigation_background"
android:background="@color/component_color_faq_single_activity_background_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -42,7 +42,7 @@
android:layout_width="560dp"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:background="@color/oppia_grey_background"
android:background="@color/component_color_faq_single_activity_background_color"
android:clipToPadding="false"
android:fillViewport="true"
android:overScrollMode="never"
Expand All @@ -51,7 +51,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_def_white"
android:background="@color/component_color_faq_list_activity_container_background_color"
android:orientation="vertical"
android:paddingStart="@dimen/faq_single_padding_start"
android:paddingTop="@dimen/faq_single_padding_top"
Expand All @@ -64,7 +64,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/component_color_faq_single_activity_text_color"
android:textSize="18sp" />

<TextView
Expand All @@ -74,7 +74,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:fontFamily="sans-serif"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/component_color_faq_single_activity_text_color"
android:textSize="16sp" />
</LinearLayout>
</ScrollView>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-sw600dp/help_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oppia_grey_background">
android:background="@color/component_color_help_activity_background_color">

<FrameLayout
android:id="@+id/help_fragment_placeholder"
Expand All @@ -34,7 +34,7 @@
android:layout_height="48dp"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:background="@color/oppia_grey_background"
android:background="@color/component_color_help_activity_background_color"
android:contentDescription="@string/help_activity_back_arrow_description"
android:padding="12dp"
app:srcCompat="@drawable/ic_arrow_back_black_24_dp"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/faq_content.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_def_white">
android:background="@color/component_color_faq_list_activity_container_background_color">

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -35,7 +35,7 @@
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:text="@{viewModel.question}"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/component_color_faq_list_activity_text_color"
android:textSize="14sp" />

<View
Expand All @@ -44,7 +44,7 @@
android:layout_height="1dp"
android:layout_marginStart="@dimen/faq_content_margin_start"
android:layout_marginEnd="@dimen/faq_content_margin_end"
android:background="@color/oppia_faq_divider" />
android:background="@color/component_color_faq_list_activity_divider_color" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
4 changes: 2 additions & 2 deletions app/src/main/res/layout/faq_item_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_def_white">
android:background="@color/component_color_faq_list_activity_container_background_color">

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -32,7 +32,7 @@
android:layout_marginEnd="@dimen/faq_item_header_margin_end"
android:layout_marginBottom="@dimen/faq_item_header_margin_bottom"
android:text="@string/featured_questions"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/component_color_faq_list_activity_text_color"
android:textSize="18sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/faq_list_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:background="@color/oppia_primary"
android:background="@color/component_color_faq_list_activity_toolbar_color"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Widget.AppCompat.ActionBar"
app:titleTextAppearance="@style/ToolbarTextAppearance"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/faq_list_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/general_navigation_background"
android:background="@color/component_color_faq_list_activity_background_color"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingBottom="@dimen/faq_list_scroll_padding_bottom"
Expand All @@ -22,7 +22,7 @@
android:id="@+id/faq_fragment_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_faq_list_activity_container_background_color"
android:clipToPadding="false"
android:nestedScrollingEnabled="false"
android:paddingBottom="@dimen/faq_list_padding_bottom"
Expand Down
12 changes: 6 additions & 6 deletions app/src/main/res/layout/faq_single_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white">
android:background="@color/component_color_faq_single_activity_container_background_color">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/faq_single_app_bar_layout"
Expand All @@ -20,7 +20,7 @@
android:id="@+id/faq_single_activity_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:background="@color/component_color_faq_single_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
app:navigationContentDescription="@string/navigate_up"
Expand All @@ -40,7 +40,7 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oppia_grey_background"
android:background="@color/component_color_faq_single_activity_background_color"
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingBottom="@dimen/faq_single_activity_scroll_padding_bottom"
Expand All @@ -49,7 +49,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_def_white"
android:background="@color/component_color_faq_single_activity_container_background_color"
android:orientation="vertical"
android:paddingStart="@dimen/faq_single_padding_start"
android:paddingTop="@dimen/faq_single_padding_top"
Expand All @@ -62,7 +62,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="sans-serif-medium"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/component_color_faq_single_activity_text_color"
android:textSize="18sp" />

<TextView
Expand All @@ -72,7 +72,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:fontFamily="sans-serif"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/component_color_faq_single_activity_text_color"
android:textSize="16sp" />
</LinearLayout>
</ScrollView>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/help_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
android:id="@+id/help_fragment_placeholder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oppia_grey_background" />
android:background="@color/component_color_help_activity_background_color" />

<View
android:id="@+id/help_activity_toolbar_shadow_view"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/help_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
android:id="@+id/help_item_text_view"
style="@style/Subtitle1ViewStart"
android:layout_width="match_parent"
android:background="@drawable/general_item_background_border"
android:background="@drawable/general_item_border"
android:onClick="@{() -> viewModel.onClick(viewModel.title)}"
android:paddingStart="16dp"
android:paddingTop="20dp"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/help_without_drawer_activity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
android:id="@+id/help_fragment_placeholder"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/oppia_grey_background" />
android:background="@color/component_color_help_activity_background_color" />

<View
android:id="@+id/help_activity_toolbar_shadow_view"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/color_defs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<color name="color_def_bright_grey">#E4F2F1</color>
<color name="color_def_forest_green">#035D63</color>
<color name="color_def_bright_turquoise">#663BD1C4</color>
<color name="color_def_dark_silver">#707070</color>
<color name="color_def_oppia_silver">#C4C4C4</color>
<color name="color_def_oppia_turquoise">#3bd1c4</color>
<color name="color_def_oppia_bangladesh_green">#03635B</color>
Expand All @@ -50,4 +49,5 @@
<color name="color_def_oppia_dark_grey">#4D4D4D</color>
<color name="color_def_oppia_pink">#FF938F</color>
<color name="color_def_oppia_grayish_black">#32363B</color>
<color name="color_def_dark_silver">#707070</color>
</resources>
15 changes: 15 additions & 0 deletions app/src/main/res/values/component_colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@
<color name="component_color_admin_pin_activity_layout_background_color">@color/color_palette_background_color</color>
<!-- Pin Password Activity -->
<color name="component_color_pin_password_activity_layout_background_color">@color/color_palette_background_color</color>
<!-- Help Activity -->
<color name="component_color_help_activity_background_color">@color/color_palette_dark_background_color</color>
<color name="component_color_help_activity_container_color">@color/color_palette_container_background_color</color>
<!-- FAQ List Activity -->
<color name="component_color_faq_list_activity_background_color">@color/color_palette_dark_background_color</color>
<color name="component_color_faq_list_activity_text_color">@color/color_palette_dark_text_color</color>
<color name="component_color_faq_list_activity_container_background_color">@color/color_palette_container_background_color</color>
<color name="component_color_faq_list_activity_toolbar_color">@color/color_palette_toolbar_color</color>
<color name="component_color_faq_list_activity_divider_color">@color/color_palette_divider_color</color>
<!-- FAQ Single Activity -->
<color name="component_color_faq_single_activity_background_color">@color/color_palette_dark_background_color</color>
<color name="component_color_faq_single_activity_text_color">@color/color_palette_dark_text_color</color>
<color name="component_color_faq_single_activity_container_background_color">@color/color_palette_container_background_color</color>
<color name="component_color_faq_single_activity_toolbar_color">@color/color_palette_toolbar_color</color>
<color name="component_color_faq_single_activity_divider_color">@color/color_palette_divider_color</color>
<!-- Profile and Device ID Activity -->
<color name="component_color_profile_and_device_id_activity_primary_text_color">@color/color_palette_primary_text_color</color>
<color name="component_color_profile_and_device_id_activity_enabled_icon_button_color">@color/color_palette_primary_text_color</color>
Expand Down

0 comments on commit 09b3ba1

Please sign in to comment.