浏览代码

Add haptic feedback to reader page slider (#5763)

Ivan Iskandar 3 年之前
父节点
当前提交
887b157056
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt

+ 2 - 0
app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt

@@ -17,6 +17,7 @@ import android.graphics.PorterDuff
 import android.os.Build
 import android.os.Bundle
 import android.view.Gravity
+import android.view.HapticFeedbackConstants
 import android.view.KeyEvent
 import android.view.Menu
 import android.view.MenuItem
@@ -347,6 +348,7 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
                 override fun onProgressChanged(seekBar: SeekBar, value: Int, fromUser: Boolean) {
                     if (viewer != null && fromUser) {
                         moveToPageIndex(value)
+                        binding.pageSeekbar.performHapticFeedback(HapticFeedbackConstants.VIRTUAL_KEY)
                     }
                 }
             }