Add skipping

Add the ability to skip fowards/backwards.
This commit is contained in:
OxygenCobalt
2020-10-13 12:40:16 -06:00
parent d8f40bfd27
commit 3376b57f8e
13 changed files with 149 additions and 7 deletions
+1 -1
View File
@@ -7,5 +7,5 @@
android:tint="@color/control_color">
<path
android:fillColor="@android:color/white"
android:pathData="M7.41,8.59L12,13.17l4.59,-4.58L18,10l-6,6 -6,-6 1.41,-1.41z" />
android:pathData="M 5.88,7.06 12,13.166667 18.12,7.06 20,8.94 l -8,8 -8,-8 z" />
</vector>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="@color/control_color">
<path
android:fillColor="@android:color/white"
android:pathData="M6,18l8.5,-6L6,6v12zM16,6v12h2V6h-2z" />
</vector>
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="@color/control_color">
<path
android:fillColor="@android:color/white"
android:pathData="M6,6h2v12L6,18zM9.5,12l8.5,6L18,6z" />
</vector>
@@ -19,6 +19,7 @@
android:id="@+id/playback_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:background="@color/background">
<androidx.appcompat.widget.Toolbar
@@ -157,5 +158,33 @@
app:layout_constraintStart_toStartOf="parent"
tools:src="@drawable/ic_play_to_pause" />
<ImageButton
android:id="@+id/playback_skip_next"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="@dimen/size_play_pause_compact"
android:layout_height="@dimen/size_play_pause_compact"
android:layout_marginStart="@dimen/margin_mid_large"
android:contentDescription="@string/description_skip_next"
android:background="@drawable/ui_unbounded_ripple"
android:src="@drawable/ic_skip_next"
android:onClick="@{() -> playbackModel.skipNext()}"
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
app:layout_constraintStart_toEndOf="@+id/playback_play_pause"
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
<ImageButton
android:id="@+id/playback_skip_prev"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="@dimen/size_play_pause_compact"
android:layout_height="@dimen/size_play_pause_compact"
android:src="@drawable/ic_skip_prev"
android:contentDescription="@string/description_skip_prev"
android:background="@drawable/ui_unbounded_ripple"
android:layout_marginEnd="@dimen/margin_mid_large"
android:onClick="@{() -> playbackModel.skipPrev()}"
app:layout_constraintBottom_toBottomOf="@+id/playback_play_pause"
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
app:layout_constraintTop_toTopOf="@+id/playback_play_pause" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
+2
View File
@@ -39,6 +39,8 @@
<string name="description_sort_alpha_up">Sort from Z to A</string>
<string name="description_play">Play</string>
<string name="description_pause">Pause</string>
<string name="description_skip_next">Skip to next song</string>
<string name="description_skip_prev">Skip to last song</string>
<!-- Placeholder Namespace | Placeholder values -->
<string name="placeholder_genre">Unknown Genre</string>