Skip to content

Commit

Permalink
Fix part of #10: Hifi ContinuePlaying (#605)
Browse files Browse the repository at this point in the history
* Removed padding from sides in Image in ongoing_story_card in ContinuePlayingList.

* Reapplied side padding to the image. Removed hardcoded height attribute and applied dimensionRatio to the image.

* ContentDescription attribute and the string reference for it is added in ongoing_story_card.

* ScaleType of ImageView is changed and side paddings are removed, RecyclerView paddingBottom set to 172dp

* Removed padding top from the image in ongoing_story_card.
  • Loading branch information
Luffy18346 authored and rt4914 committed Jan 17, 2020
1 parent f8cd71d commit 7570940
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/layout/continue_playing_fragment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
android:clipToPadding="false"
android:overScrollMode="never"
android:paddingTop="8dp"
android:paddingBottom="128dp"
android:paddingBottom="172dp"
android:scrollbars="none"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />

Expand Down
10 changes: 4 additions & 6 deletions app/src/main/res/layout/ongoing_story_card.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@
<ImageView
android:id="@+id/lesson_thumbnail"
android:layout_width="80dp"
android:layout_height="44dp"
android:layout_height="0dp"
android:layout_marginStart="8dp"
android:importantForAccessibility="no"
android:paddingStart="40dp"
android:paddingTop="4dp"
android:paddingEnd="40dp"
android:scaleType="centerCrop"
android:contentDescription="@{@string/lesson_thumbnail_content_description(viewModel.ongoingStory.nextChapterName)}"
android:scaleType="centerInside"
android:src="@{viewModel.ongoingStory.lessonThumbnail.thumbnailGraphic}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="16:9"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:roundedRectDrawableWithColor="@{viewModel.ongoingStory.lessonThumbnail.backgroundColorRgb}" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<string name="view_all">View All</string>
<string name="ongoing_story_last_week">Played within the Last Week</string>
<string name="ongoing_story_last_month">Played within the Last Month</string>
<string name="lesson_thumbnail_content_description">Image for %s</string>
<string name="all_topics">All Topics</string>
<string name="stories_you_can_play">Stories You Can Play</string>
<string name="go_to_previous_page">Go to previous page.</string>
Expand Down

0 comments on commit 7570940

Please sign in to comment.