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 #3122, #4600: Dark mode implementation - Home Screen, Recently Played Screen, Promotional Cards, Profile Progress, Ongoing Topic List, Completed Story List #4786

Merged
merged 53 commits into from
Dec 18, 2022
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
f8ee55f
fixed text cut off
MohitGupta121 May 25, 2022
d4bcf1d
Merge branch 'oppia:develop' into develop
MohitGupta121 May 25, 2022
bb3d3d4
fix text cutoff in all layouts
MohitGupta121 May 28, 2022
7153aef
Merge branch 'oppia:develop' into develop
MohitGupta121 May 28, 2022
4113302
add proper naming
MohitGupta121 May 28, 2022
c033a39
Merge branch 'develop' of https://github.com/MohitGupta121/oppia-andr…
MohitGupta121 May 28, 2022
9ea9d7c
Merge branch 'oppia:develop' into develop
MohitGupta121 Jun 6, 2022
8ba669b
Merge branch 'oppia:develop' into develop
MohitGupta121 Jun 8, 2022
7dc1b4a
Merge branch 'oppia:develop' into develop
MohitGupta121 Jun 14, 2022
0708dd6
Merge branch 'oppia:develop' into develop
MohitGupta121 Jun 23, 2022
2f3b9ec
Merge branch 'oppia:develop' into develop
MohitGupta121 Jul 1, 2022
ce3872a
develop updated
MohitGupta121 Jul 6, 2022
12bb87f
minor changes
MohitGupta121 Jul 6, 2022
690ba7e
Merge branch 'oppia:develop' into develop
MohitGupta121 Jul 12, 2022
bce7b61
Merge branch 'oppia:develop' into develop
MohitGupta121 Jul 12, 2022
9912ffc
Merge branch 'oppia:develop' into develop
MohitGupta121 Jul 22, 2022
f48f663
Merge branch 'oppia:develop' into develop
MohitGupta121 Aug 11, 2022
dacc6ee
Merge branch 'oppia:develop' into develop
MohitGupta121 Aug 16, 2022
656c283
Merge branch 'oppia:develop' into develop
MohitGupta121 Aug 17, 2022
f40026f
Merge branch 'oppia:develop' into develop
MohitGupta121 Aug 24, 2022
5461595
Merge branch 'oppia:develop' into develop
MohitGupta121 Aug 24, 2022
57268f3
Merge branch 'oppia:develop' into develop
MohitGupta121 Aug 25, 2022
b6b2363
Merge branch 'oppia:develop' into develop
MohitGupta121 Aug 30, 2022
0c77b97
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 3, 2022
53ea822
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 7, 2022
cc61a49
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 7, 2022
da20047
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 8, 2022
119cc0f
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 9, 2022
c39d761
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 13, 2022
bcbbe75
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 15, 2022
0cd7c77
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 16, 2022
af82314
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 20, 2022
9c9325e
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 22, 2022
4afb67f
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 23, 2022
9470168
Merge branch 'oppia:develop' into develop
MohitGupta121 Sep 25, 2022
9f8dc02
Merge branch 'oppia:develop' into develop
MohitGupta121 Oct 3, 2022
77108da
Merge branch 'oppia:develop' into develop
MohitGupta121 Oct 11, 2022
8147a38
Merge branch 'oppia:develop' into develop
MohitGupta121 Oct 18, 2022
c960247
Merge branch 'oppia:develop' into develop
MohitGupta121 Oct 19, 2022
77e6007
Merge branch 'oppia:develop' into develop
MohitGupta121 Oct 31, 2022
96dbf50
Merge branch 'oppia:develop' into develop
MohitGupta121 Nov 1, 2022
863f4ca
Merge branch 'oppia:develop' into develop
MohitGupta121 Nov 12, 2022
bac4eb5
Merge branch 'oppia:develop' into develop
MohitGupta121 Nov 18, 2022
bfb5c2a
Merge branch 'oppia:develop' into develop
MohitGupta121 Nov 22, 2022
fd177db
Merge branch 'oppia:develop' into develop
MohitGupta121 Nov 25, 2022
1c64914
Merge branch 'oppia:develop' into develop
MohitGupta121 Nov 29, 2022
368679b
Merge branch 'oppia:develop' into develop
MohitGupta121 Dec 6, 2022
2ccb654
Merge branch 'oppia:develop' into develop
MohitGupta121 Dec 9, 2022
d48b4fa
Merge branch 'oppia:develop' into develop
MohitGupta121 Dec 11, 2022
42a8a47
Home,RecentlyPlayed,Promotion,ProfileProgress,OngoingTopic,CompletedS…
MohitGupta121 Dec 12, 2022
cc9cdf5
Remove unused drawables.
MohitGupta121 Dec 14, 2022
cbb1f70
Fixed color naming and toolbar title color naming with proper shared …
MohitGupta121 Dec 15, 2022
f1966b3
remove unused drawable.
MohitGupta121 Dec 16, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
android:bottomRightRadius="4dp"
android:topLeftRadius="0dp"
android:topRightRadius="0dp" />
<solid android:color="@color/color_def_white" />
<solid android:color="@color/component_color_shared_rounded_rect_background_color" />
</shape>
9 changes: 0 additions & 9 deletions app/src/main/res/drawable/grey_card_rounded_border.xml

This file was deleted.

This file was deleted.

27 changes: 14 additions & 13 deletions app/src/main/res/layout-land/profile_progress_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
android:id="@+id/profile_edit_image"
android:layout_width="160dp"
android:layout_height="160dp"
android:background="@color/color_def_white_light"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
android:clickable="true"
android:contentDescription="@string/current_profile_picture_content_description"
android:focusable="true"
Expand Down Expand Up @@ -56,7 +55,7 @@
android:layout_marginTop="12dp"
android:fontFamily="sans-serif-medium"
android:text="@{viewModel.profile.name}"
android:textColor="@color/component_color_profile_progress_activity_profile_name_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="28sp"
app:layout_constraintEnd_toEndOf="@id/completed_stories_container"
app:layout_constraintStart_toStartOf="@+id/ongoing_topics_container"
Expand All @@ -70,17 +69,18 @@
android:layout_marginTop="20dp"
android:layout_marginEnd="20dp"
android:layout_weight="1"
android:background="@drawable/grey_card_rounded_border"
android:clickable="@{viewModel.ongoingTopicCount > 0}"
android:importantForAccessibility="yes"
android:onClick="@{() -> viewModel.clickOnOngoingTopicCount()}"
app:cardBackgroundColor="@color/component_color_profile_progress_activity_stories_progress_background_color"
app:cardBackgroundColor="@color/component_color_shared_rounded_rect_background_color"
app:cardElevation="4dp"
app:contentPadding="8dp"
app:layout_constraintEnd_toStartOf="@+id/completed_stories_container"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/profile_edit_image"
app:layout_constraintTop_toBottomOf="@+id/profile_name_text_view">
app:layout_constraintTop_toBottomOf="@+id/profile_name_text_view"
app:strokeColor="@color/component_color_profile_progress_activity_story_count_card_stroke_color"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
app:strokeWidth="0.5dp">

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -97,7 +97,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@{Integer.toString(viewModel.ongoingTopicCount)}"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="24sp" />

<TextView
Expand All @@ -107,7 +107,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@{viewModel.ongoingTopicCount != 1 ? @string/topics_in_progress : @string/topic_in_progress}"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="12sp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
Expand All @@ -119,17 +119,18 @@
android:layout_marginTop="20dp"
android:layout_marginEnd="4dp"
android:layout_weight="1"
android:background="@drawable/grey_card_rounded_border"
android:clickable="@{viewModel.completedStoryCount > 0}"
android:importantForAccessibility="yes"
android:onClick="@{() -> viewModel.clickOnCompletedStoryCount()}"
app:cardBackgroundColor="@color/component_color_profile_progress_activity_stories_progress_background_color"
app:cardBackgroundColor="@color/component_color_shared_rounded_rect_background_color"
app:cardElevation="4dp"
app:contentPadding="8dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/ongoing_topics_container"
app:layout_constraintTop_toBottomOf="@+id/profile_name_text_view">
app:layout_constraintTop_toBottomOf="@+id/profile_name_text_view"
app:strokeColor="@color/component_color_profile_progress_activity_story_count_card_stroke_color"
app:strokeWidth="0.5dp">

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -146,7 +147,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@{Integer.toString(viewModel.completedStoryCount)}"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="24sp" />

<TextView
Expand All @@ -156,7 +157,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@{viewModel.completedStoryCount != 1 ? @string/stories_completed : @string/story_completed}"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="12sp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
Expand All @@ -170,7 +171,7 @@
android:fontFamily="sans-serif-medium"
android:minHeight="48dp"
android:text="@string/recently_played_stories"
android:textColor="@color/component_color_profile_progress_activity_recently_played_stories_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="18sp"
android:visibility="@{viewModel.headerTextVisibility}"
app:layout_constraintStart_toStartOf="parent"
Expand Down
27 changes: 14 additions & 13 deletions app/src/main/res/layout-sw600dp/profile_progress_header.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_marginStart="@dimen/profile_edit_image_layout_margin_start"
android:background="@color/color_def_white_light"
android:clickable="true"
android:contentDescription="@string/current_profile_picture_content_description"
android:focusable="true"
Expand Down Expand Up @@ -58,7 +57,7 @@
android:layout_marginEnd="@dimen/profile_name_text_view_layout_margin_end"
android:fontFamily="sans-serif-medium"
android:text="@{viewModel.profile.name}"
android:textColor="@color/component_color_profile_progress_activity_profile_name_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="28sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/profile_edit_image"
Expand All @@ -71,17 +70,18 @@
android:layout_marginTop="20dp"
android:layout_marginEnd="24dp"
android:layout_weight="1"
android:background="@drawable/grey_card_rounded_border"
android:clickable="@{viewModel.ongoingTopicCount > 0}"
android:importantForAccessibility="yes"
android:onClick="@{() -> viewModel.clickOnOngoingTopicCount()}"
app:cardBackgroundColor="@color/component_color_profile_progress_activity_stories_progress_background_color"
app:cardBackgroundColor="@color/component_color_shared_rounded_rect_background_color"
app:cardElevation="4dp"
app:contentPadding="8dp"
app:layout_constraintEnd_toStartOf="@+id/completed_stories_container"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toStartOf="@+id/profile_name_text_view"
app:layout_constraintTop_toBottomOf="@+id/profile_name_text_view">
app:layout_constraintTop_toBottomOf="@+id/profile_name_text_view"
app:strokeColor="@color/component_color_profile_progress_activity_story_count_card_stroke_color"
app:strokeWidth="0.5dp">

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -98,7 +98,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@{Integer.toString(viewModel.ongoingTopicCount)}"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="24sp" />

<TextView
Expand All @@ -108,7 +108,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@{viewModel.ongoingTopicCount != 1 ? @string/topics_in_progress : @string/topic_in_progress}"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="12sp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
Expand All @@ -119,17 +119,18 @@
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:background="@drawable/grey_card_rounded_border"
android:clickable="@{viewModel.completedStoryCount > 0}"
android:importantForAccessibility="yes"
android:onClick="@{() -> viewModel.clickOnCompletedStoryCount()}"
app:cardBackgroundColor="@color/component_color_profile_progress_activity_stories_progress_background_color"
app:cardBackgroundColor="@color/component_color_shared_rounded_rect_background_color"
app:cardElevation="4dp"
app:contentPadding="8dp"
app:layout_constraintEnd_toEndOf="@+id/profile_name_text_view"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintStart_toEndOf="@+id/ongoing_topics_container"
app:layout_constraintTop_toBottomOf="@+id/profile_name_text_view">
app:layout_constraintTop_toBottomOf="@+id/profile_name_text_view"
app:strokeColor="@color/component_color_profile_progress_activity_story_count_card_stroke_color"
app:strokeWidth="0.5dp">

<LinearLayout
android:layout_width="match_parent"
Expand All @@ -146,7 +147,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@{Integer.toString(viewModel.completedStoryCount)}"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="24sp" />

<TextView
Expand All @@ -156,7 +157,7 @@
android:layout_height="wrap_content"
android:fontFamily="sans-serif"
android:text="@{viewModel.completedStoryCount != 1 ? @string/stories_completed : @string/story_completed}"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="12sp" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
Expand All @@ -171,7 +172,7 @@
android:fontFamily="sans-serif-medium"
android:minHeight="48dp"
android:text="@string/recently_played_stories"
android:textColor="@color/component_color_profile_progress_activity_stories_progress_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
android:textSize="18sp"
android:visibility="@{viewModel.headerTextVisibility}"
app:layout_constraintEnd_toStartOf="@+id/view_all_text_view"
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/completed_story_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/component_color_completed_progress_activity_completed_story_card_color"
android:background="@color/component_color_shared_rounded_rect_background_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -69,7 +69,7 @@
android:maxLines="2"
android:minLines="2"
android:text="@{viewModel.completedStoryName}"
android:textColor="@color/component_color_completed_progress_activity_completed_story_card_text_color"
android:textColor="@color/component_color_shared_content_item_text_view_color"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -90,7 +90,7 @@
android:paddingBottom="12dp"
android:text="@{viewModel.topicName}"
android:textAllCaps="true"
android:textColor="@color/component_color_completed_progress_activity_completed_story_card_text_color"
android:textColor="@color/component_color_shared_story_card_topic_name_text_color"
android:textSize="14sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/completed_story_name_text_view" />
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/completed_story_list_fragment.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="match_parent"
android:background="@color/component_color_completed_progress_activity_background_color">
android:background="@color/component_color_shared_screen_primary_background_color">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/completed_story_list_app_bar_layout"
Expand All @@ -27,7 +27,7 @@
android:id="@+id/completed_story_list_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/component_color_completed_progress_activity_toolbar_color"
android:background="@color/component_color_shared_activity_toolbar_color"
android:fontFamily="sans-serif"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
android:minHeight="?attr/actionBarSize"
app:navigationContentDescription="@string/navigate_up"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/home_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<FrameLayout
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/component_color_home_activity_background_color"
android:background="@color/component_color_shared_screen_primary_background_color"
android:gravity="center">

<androidx.recyclerview.widget.RecyclerView
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/res/layout/ongoing_topic_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
android:id="@+id/constraintLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/topic_title_background"
android:background="@color/component_color_shared_topic_card_item_background_color"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -67,7 +67,7 @@
android:gravity="start"
android:lines="2"
android:text="@{viewModel.topicTitle}"
android:textColor="@color/color_def_white"
android:textColor="@color/component_color_shared_topic_card_primary_text_view_color"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toStartOf="parent"
Expand All @@ -82,7 +82,7 @@
android:fontFamily="sans-serif-light"
android:paddingBottom="12dp"
android:text="@{viewModel.computeStoryCountText()}"
android:textColor="@color/color_def_white_80"
android:textColor="@color/component_color_shared_topic_card_primary_text_view_color"
android:textSize="14sp"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="@id/topic_name_text_view"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/ongoing_topic_list_fragment.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="match_parent"
android:background="@color/component_color_ongoing_progress_activity_background_color">
android:background="@color/component_color_shared_screen_primary_background_color">

<com.google.android.material.appbar.AppBarLayout
android:id="@+id/ongoing_topic_list_app_bar_layout"
Expand All @@ -27,7 +27,7 @@
android:id="@+id/ongoing_topic_list_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/component_color_ongoing_progress_activity_toolbar_color"
android:background="@color/component_color_shared_activity_toolbar_color"
android:fontFamily="sans-serif"
android:minHeight="?attr/actionBarSize"
app:navigationContentDescription="@string/navigate_up"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/profile_progress_fragment.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="match_parent"
android:background="@color/component_color_profile_progress_activity_background_color">
android:background="@color/component_color_shared_screen_primary_background_color">

<FrameLayout
android:layout_width="match_parent"
Expand All @@ -23,7 +23,7 @@

<androidx.recyclerview.widget.RecyclerView
android:id="@+id/profile_progress_list"
android:background="@color/color_def_transparent"
android:background="@color/component_color_shared_transparent_background_color"
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/profile_progress_fragment_margin_start"
Expand Down
Loading