Auxio/app/src/main/res/layout/item_artist_album.xml
OxygenCobalt 443c26fe98
styles: refactor style methodology
Refactor the styling again to make all styles start with the Auxio
prefix. Also try to phase out the usage of layout_width and
layout_height in most places, since those can cause a lot of
frustration if they aren't used in the layout they are expected in.
2021-09-14 20:16:55 -06:00

52 lines
No EOL
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=".detail.recycler.ArtistDetailAdapter.ArtistAlbumViewHolder">
<data>
<variable
name="album"
type="org.oxycblt.auxio.music.Album" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout style="@style/Widget.Auxio.ItemLayout">
<ImageView
android:id="@+id/album_cover"
style="@style/Widget.Auxio.Image.Normal"
android:contentDescription="@{@string/desc_album_cover(album.name)}"
app:albumArt="@{album}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@drawable/ic_album" />
<TextView
android:id="@+id/album_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="@style/Widget.Auxio.TextView.Item.Primary"
android:textColor="@color/sel_accented_primary"
android:text="@{album.name}"
app:layout_constraintBottom_toTopOf="@+id/album_year"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/album_cover"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Album Name" />
<TextView
android:id="@+id/album_year"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="@style/Widget.Auxio.TextView.Item.Secondary"
android:text="@{album.year != 0 ? String.valueOf(album.year) : @string/def_date}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/album_cover"
app:layout_constraintTop_toBottomOf="@+id/album_name"
tools:text="2020" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>