playback: add playing from indicator to fragment
Add the "Playing From" indicator that used be on the queue to the main playback view.
This commit is contained in:
parent
13730c303c
commit
049b279e1f
7 changed files with 10 additions and 1 deletions
|
@ -84,7 +84,7 @@ data class Song(
|
|||
val album: Album get() = requireNotNull(mAlbum)
|
||||
|
||||
val seconds: Long get() = duration / 1000
|
||||
val formattedDuration: String get() = (duration / 1000).toDuration(false)
|
||||
val formattedDuration: String get() = seconds.toDuration(false)
|
||||
|
||||
override val hash: Long get() {
|
||||
var result = name.hashCode().toLong()
|
||||
|
|
|
@ -111,6 +111,10 @@ class PlaybackFragment : Fragment() {
|
|||
}
|
||||
}
|
||||
|
||||
playbackModel.parent.observe(viewLifecycleOwner) { parent ->
|
||||
binding.playbackToolbar.subtitle = parent?.name ?: getString(R.string.lbl_all_songs)
|
||||
}
|
||||
|
||||
playbackModel.isShuffling.observe(viewLifecycleOwner) { isShuffling ->
|
||||
binding.playbackShuffle.isActivated = isShuffling
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
tools:subtitle="@string/lbl_all_songs"
|
||||
app:title="@string/lbl_playback" />
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
style="@style/Widget.Auxio.Toolbar.Icon.Down"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:title="@string/lbl_playback"
|
||||
tools:subtitle="@string/lbl_all_songs"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback" />
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:title="@string/lbl_playback"
|
||||
tools:subtitle="@string/lbl_all_songs"
|
||||
app:menu="@menu/menu_playback" />
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:title="@string/lbl_playback"
|
||||
tools:subtitle="@string/lbl_all_songs"
|
||||
app:menu="@menu/menu_playback" />
|
||||
|
||||
<ImageView
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:title="@string/lbl_playback"
|
||||
tools:subtitle="@string/lbl_all_songs"
|
||||
app:menu="@menu/menu_playback" />
|
||||
|
||||
<ImageView
|
||||
|
|
Loading…
Reference in a new issue