|
@@ -81,17 +81,17 @@ abstract class CommonBindingActivity<T : ViewBinding> : BaseBindingActivity<T>()
|
|
|
override fun onPause() {
|
|
|
super.onPause()
|
|
|
isResume = false
|
|
|
-// stopScreenSaverCount()
|
|
|
+ stopScreenSaverCount()
|
|
|
}
|
|
|
|
|
|
override fun dispatchTouchEvent(ev: MotionEvent): Boolean {
|
|
|
if (ev.x == 0f && ev.y == 0f) {
|
|
|
return true
|
|
|
}
|
|
|
-// when (ev.action) {
|
|
|
-// MotionEvent.ACTION_UP -> if (!hasShowScreenSaver) startScreenSaverCount()
|
|
|
-// else -> stopScreenSaverCount()
|
|
|
-// }
|
|
|
+ when (ev.action) {
|
|
|
+ MotionEvent.ACTION_UP -> if (!hasShowScreenSaver) startScreenSaverCount()
|
|
|
+ else -> stopScreenSaverCount()
|
|
|
+ }
|
|
|
if (ev.action == MotionEvent.ACTION_DOWN) {
|
|
|
//全局点击外面关闭软键盘
|
|
|
// 获得当前得到焦点的View,一般情况下就是EditText(特殊情况就是轨迹求或者实体案件会移动焦点)
|