
Rework the playback slide up implementation to be more straightfoward. This is really composed of stylistic improvements, very little in actual behavior changes. This does re-introduce a regression when nothing is playing where the scroll position will become off when rotating, but that desynchronization happens often so unless I were to completely migrate both the panel and the bar to a view, I don't really see it as an issue.
84 lines
No EOL
3.8 KiB
XML
84 lines
No EOL
3.8 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=".playback.PlaybackBarView">
|
|
|
|
<data>
|
|
|
|
<variable
|
|
name="song"
|
|
type="org.oxycblt.auxio.music.Song" />
|
|
|
|
</data>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
|
|
|
|
<org.oxycblt.auxio.coil.RoundableImageView
|
|
android:id="@+id/playback_cover"
|
|
style="@style/Widget.Auxio.Image.Small"
|
|
android:layout_margin="@dimen/spacing_small"
|
|
android:contentDescription="@{@string/desc_album_cover(song.resolvedName)}"
|
|
app:albumArt="@{song}"
|
|
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
tools:src="@drawable/ic_album" />
|
|
|
|
<TextView
|
|
android:id="@+id/playback_song"
|
|
style="@style/Widget.Auxio.TextView.Primary.Compact"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="@dimen/spacing_small"
|
|
android:layout_marginEnd="@dimen/spacing_small"
|
|
android:text="@{song.resolvedName}"
|
|
app:layout_constraintBottom_toTopOf="@+id/playback_info"
|
|
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
|
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
|
app:layout_constraintTop_toTopOf="@+id/playback_cover"
|
|
app:layout_constraintVertical_chainStyle="packed"
|
|
tools:text="Song Name" />
|
|
|
|
<TextView
|
|
android:id="@+id/playback_info"
|
|
style="@style/Widget.Auxio.TextView.Secondary.Compact"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="@dimen/spacing_small"
|
|
android:layout_marginEnd="@dimen/spacing_small"
|
|
android:ellipsize="end"
|
|
app:songInfo="@{song}"
|
|
app:layout_constraintBottom_toBottomOf="@+id/playback_cover"
|
|
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
|
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
|
app:layout_constraintTop_toBottomOf="@+id/playback_song"
|
|
tools:text="Artist Name / Album Name" />
|
|
|
|
<org.oxycblt.auxio.playback.PlaybackButton
|
|
android:id="@+id/playback_play_pause"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_margin="@dimen/spacing_small"
|
|
android:contentDescription="@string/desc_play_pause"
|
|
android:src="@drawable/sel_playing_state"
|
|
app:layout_constraintBottom_toTopOf="@+id/playback_progress_bar"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<com.google.android.material.progressindicator.LinearProgressIndicator
|
|
android:id="@+id/playback_progress_bar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:max="@{(int) song.seconds}"
|
|
app:trackColor="?attr/colorPrimary"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
tools:progress="70" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
</layout> |