Update the image behavior for the following: 1. Use ic_album as the default image for songs and albums this just looks beter in general. 2. Use a special default drawable for the widget so that it doesn't look as strange. 3. Generally update the loading process throughout the app
53 lines
2.2 KiB
XML
53 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
tools:context=".ui.SongViewHolder">
|
|
|
|
<data>
|
|
|
|
<variable
|
|
name="song"
|
|
type="org.oxycblt.auxio.music.Song" />
|
|
</data>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout style="@style/Widget.Auxio.ItemLayout">
|
|
|
|
<ImageView
|
|
android:id="@+id/album_cover"
|
|
style="@style/Widget.Auxio.Image.Compact"
|
|
android:contentDescription="@{@string/desc_album_cover(song.name)}"
|
|
app:albumArt="@{song}"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:ignore="ContentDescription"
|
|
tools:src="@drawable/ic_album" />
|
|
|
|
<TextView
|
|
android:id="@+id/song_name"
|
|
style="@style/Widget.Auxio.TextView.Item.Primary"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:text="@{song.name}"
|
|
app:layout_constraintBottom_toTopOf="@+id/song_info"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintVertical_chainStyle="packed"
|
|
tools:text="Song Name" />
|
|
|
|
<TextView
|
|
android:id="@+id/song_info"
|
|
style="@style/Widget.Auxio.TextView.Item.Secondary"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:text="@{@string/fmt_two(song.album.artist.resolvedName, song.album.name)}"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
|
app:layout_constraintTop_toBottomOf="@+id/song_name"
|
|
tools:text="Artist / Album" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</layout> |