Auxio/app/src/main/res/layout/item_genre.xml
OxygenCobalt 5fe01777d0
all: refactor utils
Do the final utility refactor, placing custom views into a .ui
submodule and the general utils into a new .util module. This
system seems to stick well.
2021-08-23 17:05:42 -06:00

48 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=".ui.GenreViewHolder">
<data>
<variable
name="genre"
type="org.oxycblt.auxio.music.Genre" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemLayout">
<ImageView
android:id="@+id/genre_image"
style="@style/Widget.ImageView.Normal"
android:contentDescription="@{@string/desc_genre_image(genre.name)}"
app:genreImage="@{genre}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@drawable/ic_genre" />
<TextView
android:id="@+id/genre_name"
style="@style/Widget.TextView.Item.Primary"
android:text="@{genre.resolvedName}"
app:layout_constraintBottom_toTopOf="@+id/genre_count"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/genre_image"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Genre Name" />
<TextView
android:id="@+id/genre_count"
style="@style/Widget.TextView.Item.Secondary"
android:text="@{@plurals/fmt_song_count(genre.songs.size(), genre.songs.size())}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/genre_image"
app:layout_constraintTop_toBottomOf="@+id/genre_name"
tools:text="40 Songs" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>