Add ellipsizing to song/album items

Add ellipsizing to the song and album items, also modify their inflation so that the items take up the entire screen width.
This commit is contained in:
OxygenCobalt
2020-08-31 07:53:41 -06:00
parent c8f7419833
commit dc45e2973a
11 changed files with 97 additions and 56 deletions
+11 -2
View File
@@ -30,12 +30,17 @@
android:id="@+id/song_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{song.title}"
android:layout_marginStart="@dimen/margin_medium"
android:ellipsize="end"
android:maxLines="1"
android:text="@{song.title}"
android:textAppearance="?android:attr/textAppearanceListItem"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintBottom_toTopOf="@+id/song_info"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/cover"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Song Name" />
<TextView
@@ -43,11 +48,15 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_medium"
android:text="@{@string/format_song_info(song.album.title, song.album.artist.name)}"
android:ellipsize="end"
android:maxLines="1"
android:text="@{@string/format_song_info(song.album.artist.name, song.album.title)}"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/cover"
app:layout_constraintTop_toBottomOf="@+id/song_name"
tools:text="Artist / Album" />
</androidx.constraintlayout.widget.ConstraintLayout>