detail: update album song layout

Update the album song layout to be more alike to other songs.

Recently I migrated the TextView in the album songs to use 48dp sizing,
like the other song views. However, this resulted in a lot of empty
space that felt off. Fix this by adding a light background to the track
number, which fills the room it takes up a bit more. It also hopefully
primes the track number to take an indicator once multi-select is
added.
This commit is contained in:
OxygenCobalt
2022-03-29 20:08:57 -06:00
parent 0107d9ff32
commit e387e72b2c
13 changed files with 81 additions and 29 deletions
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?attr/colorOnPrimaryContainer"
android:state_activated="true" />
<item android:color="?attr/colorOnSurfaceVariant" />
</selector>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:alpha="0.64" android:color="?attr/colorPrimaryContainer"
android:state_activated="true" />
<item android:alpha="0.32" android:color="?attr/colorSurfaceVariant" />
</selector>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/sel_track_bg" />
</shape>
+23 -8
View File
@@ -5,6 +5,20 @@
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.RoundableImageView
android:id="@+id/song_track_bg"
style="@style/Widget.Auxio.Image.Small"
android:src="@drawable/ui_track_bg"
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"/>
<ImageView
android:id="@+id/song_track_placeholder"
style="@style/Widget.Auxio.Image.Small"
@@ -12,26 +26,27 @@
android:layout_height="wrap_content"
android:contentDescription="@string/def_track"
android:src="@drawable/ic_song"
android:visibility="invisible"
android:visibility="gone"
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"
app:tint="@color/sel_accented"
app:tint="@color/sel_on_track_bg"
tools:text="1" />
<TextView
android:id="@+id/song_track"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="@dimen/size_btn_small"
android:layout_height="@dimen/size_btn_small"
android:gravity="center"
android:maxLines="1"
android:minWidth="@dimen/size_btn_small"
android:minHeight="@dimen/size_btn_small"
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_accented_secondary"
android:textSize="@dimen/text_size_track_number"
android:textColor="@color/sel_on_track_bg"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/song_name"
app:layout_constraintHorizontal_bias="0.5"
+3 -1
View File
@@ -26,7 +26,9 @@
<dimen name="text_size_ext_label_larger">16sp</dimen>
<dimen name="text_size_ext_title_mid_large">18sp</dimen>
<dimen name="text_size_track_number">22sp</dimen>
<dimen name="text_size_track_number_min">12sp</dimen>
<dimen name="text_size_track_number_max">20sp</dimen>
<dimen name="text_size_track_number_step">2sp</dimen>
<!-- Misc -->
<dimen name="elevation_small">2dp</dimen>