Add skipping
Add the ability to skip fowards/backwards.
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user