Files
auxio-fork/app/src/main/res/layout/item_album_song.xml
T
OxygenCobalt 74f5962844 ui: rework cover style
Rework the style of all album covers in the app to be more in line with
the new track number style.

This is mostly comprised of adding a new background to all cover views
and rescaling error icons to be smaller than they would normally be.
This also includes a change in the cover/track background color from
colorSurfaceVariant to colorOnSurfaceInverse, which seems to provide
the best visibility in all cases.

These changes also apply to the track number views.
2022-04-02 18:18:10 -06:00

68 lines
3.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout 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"
style="@style/Widget.Auxio.ItemLayout">
<!--
We don't want to show an album cover, but we still want the spacing of this song
to be alike to other songs. So, add a pastel-ish background to each track number
view. The way we do this is odd, but it's designed this way-->
<org.oxycblt.auxio.coil.StyledImageView
style="@style/Widget.Auxio.Image.Small"
android:src="@drawable/ic_song"
android:scaleType="matrix"
app:layout_constraintBottom_toBottomOf="@+id/song_track"
app:layout_constraintEnd_toEndOf="@+id/song_track"
app:layout_constraintStart_toStartOf="@+id/song_track"
app:layout_constraintTop_toTopOf="@+id/song_track" />
<TextView
android:id="@+id/song_track"
android:layout_width="@dimen/size_btn_small"
android:layout_height="@dimen/size_btn_small"
android:gravity="center"
android:maxLines="1"
app:autoSizeTextType="uniform"
app:autoSizeMinTextSize="@dimen/text_size_track_number_min"
app:autoSizeMaxTextSize="@dimen/text_size_track_number_max"
app:autoSizeStepGranularity="@dimen/text_size_track_number_step"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
android:textColor="@color/sel_on_cover_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/song_name"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="16" />
<TextView
android:id="@+id/song_name"
style="@style/Widget.Auxio.TextView.Item.Primary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="@color/sel_accented_primary"
app:layout_constraintBottom_toTopOf="@+id/song_duration"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/song_track"
app:layout_constraintTop_toTopOf="@+id/song_track"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Song Name" />
<TextView
android:id="@+id/song_duration"
style="@style/Widget.Auxio.TextView.Item.Secondary"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:textColor="?android:attr/textColorSecondary"
app:layout_constraintBottom_toBottomOf="@+id/song_track"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/song_track"
app:layout_constraintTop_toBottomOf="@+id/song_name"
tools:text="16:16" />
</androidx.constraintlayout.widget.ConstraintLayout>