Advertisement
d4nsupperman

Webview Optimize performance ex

Jul 3rd, 2024
941
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.30 KB | None | 0 0
  1. webViewRadar.setOnTouchListener { _, event ->
  2.     when (event!!.action) {
  3.         MotionEvent.ACTION_DOWN -> {
  4.             mHandler.removeCallbacksAndMessages(null)
  5.             resume()
  6.         }
  7.  
  8.         MotionEvent.ACTION_UP -> pauseWithDelay() // Tự động pause sau 15s
  9.     }
  10.     false
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement