playback: rework view implementations
Rework the playback views to follow the new idioms I want to use for Auxio. This change mostly consists of flattening away some of the custom views, removing databinding, and using a general viewbinding fragment that I hope to extend to the entire app.
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
<org.oxycblt.auxio.coil.RoundableImageView
|
||||
android:id="@+id/playback_cover"
|
||||
style="@style/Widget.Auxio.Image.Full"
|
||||
android:layout_margin="@dimen/spacing_mid_large"
|
||||
android:layout_margin="@dimen/spacing_medium"
|
||||
android:contentDescription="@{@string/desc_album_cover(song.resolvedName)}"
|
||||
app:albumArt="@{song}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -51,8 +51,8 @@
|
||||
android:id="@+id/playback_song_container"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
@@ -76,8 +76,8 @@
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album.artist)}"
|
||||
android:text="@{song.resolvedArtistName}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
||||
@@ -92,8 +92,8 @@
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album)}"
|
||||
android:text="@{song.resolvedAlbumName}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_seek_bar"
|
||||
@@ -103,17 +103,46 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_artist"
|
||||
tools:text="Album Name" />
|
||||
|
||||
<org.oxycblt.auxio.playback.PlaybackSeekBar
|
||||
<com.google.android.material.slider.Slider
|
||||
android:id="@+id/playback_seek_bar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:layout_marginBottom="@dimen/spacing_medium"
|
||||
android:valueFrom="0"
|
||||
android:valueTo="1"
|
||||
app:haloRadius="@dimen/slider_halo_radius"
|
||||
app:labelBehavior="gone"
|
||||
app:labelStyle="@style/TextAppearance.Auxio.BodySmall"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.5"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_album" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_album"
|
||||
app:thumbRadius="@dimen/slider_thumb_radius" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_seconds"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginTop="@dimen/spacing_small_inv"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyMedium"
|
||||
android:textColor="@color/sel_accented_secondary"
|
||||
app:layout_constraintStart_toStartOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
|
||||
tools:text="11:38" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:layout_marginTop="@dimen/spacing_small_inv"
|
||||
android:textAppearance="@style/TextAppearance.Auxio.BodyMedium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar"
|
||||
tools:text="16:16" />
|
||||
|
||||
<org.oxycblt.auxio.playback.PlaybackButton
|
||||
android:id="@+id/playback_loop"
|
||||
|
||||
Reference in New Issue
Block a user