Skip to content

Commit

Permalink
Fixes part of #4177: Dark mode Topic Activity Part 2 (Info Tab) (#4570)
Browse files Browse the repository at this point in the history
* fixed text cut off

* fix text cutoff in all layouts

* add proper naming

* develop updated

* minor changes

* dark_mode:info section

* changes: minor requested
  • Loading branch information
MohitGupta121 authored Sep 14, 2022
1 parent bce6c76 commit f99fa1d
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/src/main/res/drawable/thumbnail_gradient.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
android:shape="rectangle">
<gradient
android:angle="270"
android:startColor="#00FFFFFF"
android:endColor="#FFFFFFFF"
android:startColor="@color/component_color_topic_info_fragment_thumbnail_gradient_start_color"
android:endColor="@color/component_color_topic_info_fragment_thumbnail_gradient_end_color"
android:type="linear" />
</shape>
15 changes: 8 additions & 7 deletions app/src/main/res/layout/topic_info_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/color_def_white"
android:background="@color/component_color_topic_info_fragment_background_color"
android:overScrollMode="never"
android:scrollbars="none">

Expand Down Expand Up @@ -56,7 +56,7 @@
android:layout_marginBottom="8dp"
android:fontFamily="sans-serif"
android:text="@{viewModel.topicTitle}"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/component_color_topic_info_fragment_topic_name_text_color"
android:textSize="24sp"
app:layout_constraintBottom_toBottomOf="@+id/topic_thumbnail_image_view"
app:layout_constraintEnd_toEndOf="parent"
Expand All @@ -73,7 +73,7 @@
android:layout_marginEnd="32dp"
android:fontFamily="sans-serif"
android:text="@{viewModel.storyCountText}"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/component_color_topic_info_fragment_story_count_text_color"
android:textSize="16sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
Expand Down Expand Up @@ -106,7 +106,7 @@
android:onClick="@{(v) -> viewModel.clickSeeMore()}"
android:paddingTop="8dp"
android:text="@{viewModel.isDescriptionExpanded() ? @string/see_less : @string/see_more}"
android:textColor="@color/oppia_primary"
android:textColor="@color/component_color_topic_info_fragment_see_more_text_color"
android:textSize="16sp"
android:textStyle="bold"
android:visibility="@{viewModel.isSeeMoreVisible() ? View.VISIBLE : View.GONE}"
Expand All @@ -125,7 +125,8 @@
app:srcCompat="@{viewModel.downloadStatusIndicatorDrawableResourceId, default=@drawable/ic_available_offline_primary_24dp}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/see_more_text_view" />
app:layout_constraintTop_toBottomOf="@+id/see_more_text_view"
app:tint="@color/component_color_topic_info_fragment_download_status_image_color" />

<TextView
android:id="@+id/download_story_count_text_view"
Expand All @@ -135,7 +136,7 @@
android:layout_marginStart="12dp"
android:fontFamily="sans-serif"
android:text="@string/topic_downloaded"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/component_color_topic_info_fragment_download_story_count_text_color"
android:textSize="18sp"
app:layout_constraintBottom_toBottomOf="@+id/download_status_image_view"
app:layout_constraintHorizontal_bias="0.0"
Expand All @@ -151,7 +152,7 @@
android:layout_marginEnd="32dp"
android:fontFamily="sans-serif"
android:text="@{viewModel.topicSizeText}"
android:textColor="@color/oppia_primary_text"
android:textColor="@color/component_color_topic_info_fragment_download_story_size_text_color"
android:textSize="18sp"
android:textStyle="italic"
app:layout_constraintBottom_toBottomOf="@+id/download_status_image_view"
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/res/values-night/color_palette.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,7 @@
<color name="color_palette_confetti_red_color">@color/color_def_confetti_rosy_pink</color>
<color name="color_palette_confetti_yellow_color">@color/color_def_confetti_bright_gold</color>
<color name="color_palette_confetti_blue_color">@color/color_def_confetti_crystal_blue</color>
<color name="color_palette_forward_arrow_button_color">@color/color_def_oppia_turquoise</color>
<color name="color_palette_thumbnail_gradient_end_color">@color/color_def_accessible_grey</color>
<color name="color_palette_thumbnail_gradient_start_color">@color/color_def_white_0</color>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values/color_defs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@
<color name="color_def_confetti_rosy_pink">#EA6390</color>
<color name="color_def_confetti_bright_gold">#EFCF24</color>
<color name="color_def_confetti_crystal_blue">#49A9E5</color>
<color name="color_def_white_0">#00FFFFFF</color>
</resources>
4 changes: 3 additions & 1 deletion app/src/main/res/values/color_palette.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@
<color name="color_palette_drag_drop_single_item_gradient_center_color">@color/color_def_drag_drop_single_item_gradient_center</color>
<color name="color_palette_drag_drop_single_item_gradient_start_color">@color/color_def_white</color>
<color name="color_palette_drag_drop_single_item_stroke_color">@color/color_def_stroke_silver</color>
<color name="color_palette_forward_arrow_button_color">@color/color_def_oppia_dark_blue</color>
<color name="color_palette_confetti_red_color">@color/color_def_confetti_ruby_red</color>
<color name="color_palette_confetti_yellow_color">@color/color_def_confetti_light_gold</color>
<color name="color_palette_confetti_blue_color">@color/color_def_oppia_dark_blue</color>
<color name="color_palette_forward_arrow_button_color">@color/color_def_oppia_dark_blue</color>
<color name="color_palette_thumbnail_gradient_end_color">@color/color_def_white</color>
<color name="color_palette_thumbnail_gradient_start_color">@color/color_def_white_0</color>
</resources>
10 changes: 10 additions & 0 deletions app/src/main/res/values/component_colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,5 +246,15 @@
<color name="component_color_confetti_red_color">@color/color_palette_confetti_red_color</color>
<color name="component_color_confetti_yellow_color">@color/color_palette_confetti_yellow_color</color>
<color name="component_color_confetti_blue_color">@color/color_palette_confetti_blue_color</color>
<!-- Topic Info Fragment -->
<color name="component_color_topic_info_fragment_background_color">@color/color_palette_primary_background_color</color>
<color name="component_color_topic_info_fragment_topic_name_text_color">@color/color_palette_highlighted_text_color</color>
<color name="component_color_topic_info_fragment_story_count_text_color">@color/color_palette_highlighted_text_color</color>
<color name="component_color_topic_info_fragment_thumbnail_gradient_end_color">@color/color_palette_thumbnail_gradient_end_color</color>
<color name="component_color_topic_info_fragment_thumbnail_gradient_start_color">@color/color_palette_thumbnail_gradient_start_color</color>
<color name="component_color_topic_info_fragment_see_more_text_color">@color/color_palette_primary_color</color>
<color name="component_color_topic_info_fragment_download_status_image_color">@color/color_palette_primary_color</color>
<color name="component_color_topic_info_fragment_download_story_count_text_color">@color/color_palette_show_text_color</color>
<color name="component_color_topic_info_fragment_download_story_size_text_color">@color/color_palette_show_text_color</color>

</resources>

0 comments on commit f99fa1d

Please sign in to comment.