Auxio/app/src/main/res/layout/item_artist_album.xml
OxygenCobalt 828ab3ccee
styles: refactor styles
Refactor styles again, this time trying to seperate the more
layout-specific attributes so that layouts become more re-usable.
This also updates the naming conventions of styles.
2021-08-06 09:36:56 -06:00

47 lines
No EOL
1.9 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.adapters.ArtistDetailAdapter.ArtistAlbumViewHolder">
<data>
<variable
name="album"
type="org.oxycblt.auxio.music.Album" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemLayout">
<ImageView
android:id="@+id/album_cover"
style="@style/Widget.ImageView.Large"
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"
style="@style/ItemText.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"
style="@style/ItemText.Secondary"
app:albumYear="@{album}"
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>