Skip to content

Commit bdedd95

Browse files
committed
adds simple long press to seek forward/back
1 parent 7488c8e commit bdedd95

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/src/main/java/org/akanework/gramophone/ui/components/FullBottomSheet.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,20 @@ class FullBottomSheet
425425
ViewCompat.performHapticFeedback(it, HapticFeedbackConstantsCompat.CONTEXT_CLICK)
426426
instance?.seekToPrevious()
427427
}
428+
bottomSheetFullPreviousButton.setOnLongClickListener {
429+
ViewCompat.performHapticFeedback(it, HapticFeedbackConstantsCompat.LONG_PRESS)
430+
instance?.seekBack()
431+
true
432+
}
428433
bottomSheetFullNextButton.setOnClickListener {
429434
ViewCompat.performHapticFeedback(it, HapticFeedbackConstantsCompat.CONTEXT_CLICK)
430435
instance?.seekToNext()
431436
}
437+
bottomSheetFullNextButton.setOnLongClickListener {
438+
ViewCompat.performHapticFeedback(it, HapticFeedbackConstantsCompat.LONG_PRESS)
439+
instance?.seekForward()
440+
true
441+
}
432442
bottomSheetShuffleButton.addOnCheckedChangeListener { _, isChecked ->
433443
instance?.shuffleModeEnabled = isChecked
434444
}

0 commit comments

Comments
 (0)