mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Add haptic feedback to reader page slider
Based of a main tachi pr, but using a different constant for the vibration
This commit is contained in:
parent
cb235ee7fa
commit
6415387c16
1 changed files with 4 additions and 0 deletions
|
@ -13,6 +13,7 @@ import android.graphics.drawable.LayerDrawable
|
|||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.view.HapticFeedbackConstants
|
||||
import android.view.KeyEvent
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
|
@ -725,6 +726,9 @@ class ReaderActivity :
|
|||
binding.readerNav.pageSeekbar.addOnChangeListener { _, value, fromUser ->
|
||||
if (viewer != null && fromUser) {
|
||||
moveToPageIndex(value.roundToInt())
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
|
||||
binding.readerNav.pageSeekbar.performHapticFeedback(HapticFeedbackConstants.TEXT_HANDLE_MOVE)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue