playback: revert song menu move
Revert the song menu in the playback panel to being in the toolbar. It was mostly inconsistent and cause a lot of truncation. I'll figure out what I want to do when I implement liked songs.
This commit is contained in:
parent
2bec9ce977
commit
3db68d47a6
7 changed files with 51 additions and 56 deletions
|
@ -3,7 +3,8 @@
|
||||||
## dev
|
## dev
|
||||||
|
|
||||||
#### What's New
|
#### What's New
|
||||||
- Made the SeekBar much smoother and better to use
|
- Added smooth seeking
|
||||||
|
- Queue now has a fast scroller
|
||||||
|
|
||||||
#### What's Fixed
|
#### What's Fixed
|
||||||
- Fixed issue where fast scroller popup would not appear
|
- Fixed issue where fast scroller popup would not appear
|
||||||
|
|
|
@ -92,12 +92,6 @@ class PlaybackPanelFragment :
|
||||||
playbackModel.song.value?.let { navModel.exploreNavigateTo(it.album) }
|
playbackModel.song.value?.let { navModel.exploreNavigateTo(it.album) }
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.playbackSongMenu.setOnClickListener { view ->
|
|
||||||
playbackModel.song.value?.let { song ->
|
|
||||||
musicMenu(view, R.menu.menu_playback_song_actions, song)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.playbackSeekBar.callback = this
|
binding.playbackSeekBar.callback = this
|
||||||
|
|
||||||
binding.playbackRepeat.setOnClickListener { playbackModel.incrementRepeatMode() }
|
binding.playbackRepeat.setOnClickListener { playbackModel.incrementRepeatMode() }
|
||||||
|
@ -139,6 +133,21 @@ class PlaybackPanelFragment :
|
||||||
|
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
R.id.action_go_artist -> {
|
||||||
|
playbackModel.song.value?.let { navModel.exploreNavigateTo(it.album.artist) }
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.action_go_album -> {
|
||||||
|
playbackModel.song.value?.let { navModel.exploreNavigateTo(it.album) }
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.action_song_detail -> {
|
||||||
|
playbackModel.song.value?.let {
|
||||||
|
navModel.mainNavigateTo(MainNavigationAction.SongDetails(it))
|
||||||
|
}
|
||||||
|
|
||||||
|
true
|
||||||
|
}
|
||||||
else -> false
|
else -> false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,14 +47,19 @@ fun Int.nonZeroOrNull() = if (this > 0) this else null
|
||||||
|
|
||||||
fun Int.inRangeOrNull(range: IntRange) = if (range.contains(this)) this else null
|
fun Int.inRangeOrNull(range: IntRange) = if (range.contains(this)) this else null
|
||||||
|
|
||||||
|
/** Converts a long in milliseconds to a long in deci-seconds */
|
||||||
fun Long.msToDs() = floorDiv(100)
|
fun Long.msToDs() = floorDiv(100)
|
||||||
|
|
||||||
|
/** Converts a long in milliseconds to a long in seconds */
|
||||||
fun Long.msToSecs() = floorDiv(1000)
|
fun Long.msToSecs() = floorDiv(1000)
|
||||||
|
|
||||||
|
/** Converts a long in deciseconds to a long in milliseconds. */
|
||||||
fun Long.dsToMs() = times(100)
|
fun Long.dsToMs() = times(100)
|
||||||
|
|
||||||
|
/** Converts a long in deciseconds to a long in seconds. */
|
||||||
fun Long.dsToSecs() = floorDiv(10)
|
fun Long.dsToSecs() = floorDiv(10)
|
||||||
|
|
||||||
|
/** Converts a long in seconds to a long in milliseconds. */
|
||||||
fun Long.secsToMs() = times(1000)
|
fun Long.secsToMs() = times(1000)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
style="@style/Widget.Auxio.TextView.Primary"
|
style="@style/Widget.Auxio.TextView.Primary"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_medium"
|
||||||
android:layout_marginStart="@dimen/spacing_medium"
|
android:layout_marginStart="@dimen/spacing_medium"
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/playback_song_menu"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
app:layout_constraintVertical_chainStyle="packed"
|
||||||
tools:text="Song Name" />
|
tools:text="Song Name" />
|
||||||
|
@ -44,10 +44,10 @@
|
||||||
style="@style/Widget.Auxio.TextView.Secondary"
|
style="@style/Widget.Auxio.TextView.Secondary"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_medium"
|
||||||
android:layout_marginStart="@dimen/spacing_medium"
|
android:layout_marginStart="@dimen/spacing_medium"
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/playback_song_menu"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:text="Artist Name" />
|
tools:text="Artist Name" />
|
||||||
|
|
||||||
|
@ -56,23 +56,13 @@
|
||||||
style="@style/Widget.Auxio.TextView.Secondary"
|
style="@style/Widget.Auxio.TextView.Secondary"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_medium"
|
||||||
android:layout_marginStart="@dimen/spacing_medium"
|
android:layout_marginStart="@dimen/spacing_medium"
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/playback_seek_bar"
|
app:layout_constraintBottom_toTopOf="@+id/playback_seek_bar"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/playback_song_menu"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:text="Album Name" />
|
tools:text="Album Name" />
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/playback_song_menu"
|
|
||||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
app:icon="@drawable/ic_more_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/playback_album"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/playback_song" />
|
|
||||||
|
|
||||||
<org.oxycblt.auxio.playback.StyledSeekBar
|
<org.oxycblt.auxio.playback.StyledSeekBar
|
||||||
android:id="@+id/playback_seek_bar"
|
android:id="@+id/playback_seek_bar"
|
||||||
|
|
|
@ -31,10 +31,10 @@
|
||||||
style="@style/Widget.Auxio.TextView.Primary"
|
style="@style/Widget.Auxio.TextView.Primary"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_medium"
|
||||||
android:layout_marginStart="@dimen/spacing_medium"
|
android:layout_marginStart="@dimen/spacing_medium"
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/playback_song_menu"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
app:layout_constraintVertical_chainStyle="packed"
|
||||||
tools:text="Song Name" />
|
tools:text="Song Name" />
|
||||||
|
@ -44,10 +44,10 @@
|
||||||
style="@style/Widget.Auxio.TextView.Secondary"
|
style="@style/Widget.Auxio.TextView.Secondary"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_medium"
|
||||||
android:layout_marginStart="@dimen/spacing_medium"
|
android:layout_marginStart="@dimen/spacing_medium"
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/playback_song_menu"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:text="Artist Name" />
|
tools:text="Artist Name" />
|
||||||
|
|
||||||
|
@ -56,23 +56,13 @@
|
||||||
style="@style/Widget.Auxio.TextView.Secondary"
|
style="@style/Widget.Auxio.TextView.Secondary"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginEnd="@dimen/spacing_medium"
|
||||||
android:layout_marginStart="@dimen/spacing_medium"
|
android:layout_marginStart="@dimen/spacing_medium"
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/playback_seek_bar"
|
app:layout_constraintBottom_toTopOf="@+id/playback_seek_bar"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/playback_song_menu"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
tools:text="Album Name" />
|
tools:text="Album Name" />
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/playback_song_menu"
|
|
||||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
app:icon="@drawable/ic_more_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/playback_album"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/playback_song" />
|
|
||||||
|
|
||||||
<org.oxycblt.auxio.playback.StyledSeekBar
|
<org.oxycblt.auxio.playback.StyledSeekBar
|
||||||
android:id="@+id/playback_seek_bar"
|
android:id="@+id/playback_seek_bar"
|
||||||
|
|
|
@ -27,16 +27,6 @@
|
||||||
app:layout_constraintVertical_chainStyle="packed"
|
app:layout_constraintVertical_chainStyle="packed"
|
||||||
tools:staticIcon="@drawable/ic_song_24" />
|
tools:staticIcon="@drawable/ic_song_24" />
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/playback_song_menu"
|
|
||||||
style="@style/Widget.Auxio.Button.Icon.Small"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
app:icon="@drawable/ic_more_24"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/playback_album"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="@+id/playback_song_container" />
|
|
||||||
|
|
||||||
<!-- TextView is wrapped in a container so that marquee doesn't break -->
|
<!-- TextView is wrapped in a container so that marquee doesn't break -->
|
||||||
|
|
||||||
|
@ -45,9 +35,9 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/spacing_medium"
|
android:layout_marginStart="@dimen/spacing_medium"
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
android:layout_marginEnd="@dimen/spacing_medium"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/playback_song_menu"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||||
app:layout_constraintTop_toTopOf="@+id/playback_cover"
|
app:layout_constraintTop_toTopOf="@+id/playback_cover"
|
||||||
|
@ -67,10 +57,9 @@
|
||||||
style="@style/Widget.Auxio.TextView.Secondary"
|
style="@style/Widget.Auxio.TextView.Secondary"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
android:layout_marginStart="@dimen/spacing_medium"
|
android:layout_marginStart="@dimen/spacing_medium"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/playback_song_menu"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/playback_song_container"
|
app:layout_constraintTop_toBottomOf="@+id/playback_song_container"
|
||||||
|
@ -81,10 +70,9 @@
|
||||||
style="@style/Widget.Auxio.TextView.Secondary"
|
style="@style/Widget.Auxio.TextView.Secondary"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/spacing_mid_medium"
|
|
||||||
android:layout_marginStart="@dimen/spacing_medium"
|
android:layout_marginStart="@dimen/spacing_medium"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/playback_cover"
|
app:layout_constraintBottom_toBottomOf="@+id/playback_cover"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/playback_song_menu"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.5"
|
app:layout_constraintHorizontal_bias="0.5"
|
||||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/playback_artist"
|
app:layout_constraintTop_toBottomOf="@+id/playback_artist"
|
||||||
|
|
|
@ -5,5 +5,17 @@
|
||||||
android:id="@+id/action_open_equalizer"
|
android:id="@+id/action_open_equalizer"
|
||||||
android:title="@string/lbl_equalizer"
|
android:title="@string/lbl_equalizer"
|
||||||
android:icon="@drawable/ic_equalizer"
|
android:icon="@drawable/ic_equalizer"
|
||||||
app:showAsAction="always" />
|
app:showAsAction="ifRoom" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_go_artist"
|
||||||
|
android:title="@string/lbl_go_artist"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_go_album"
|
||||||
|
android:title="@string/lbl_go_album"
|
||||||
|
app:showAsAction="never" />
|
||||||
|
<item
|
||||||
|
android:id="@+id/action_song_detail"
|
||||||
|
android:title="@string/lbl_song_detail"
|
||||||
|
app:showAsAction="never" />
|
||||||
</menu>
|
</menu>
|
Loading…
Reference in a new issue