Browse Source

1.右下角网络设置添加点击区域判断,任何时候都可以点击。

20241218TB223FC(测试jar包)
wangwanlei 5 months ago
parent
commit
5e889ad6b6

+ 7
- 0
app/src/main/java/com/xhly/manageapp/ui/main/activity/MainActivity.kt View File

2014
     }
2014
     }
2015
 
2015
 
2016
     override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
2016
     override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
2017
+        val x = mBinding.netsetLlayout.x
2018
+        val y = mBinding.netsetLlayout.y
2019
+        if (ev!=null){
2020
+            if (ev.x>=x&&ev.y>=y){
2021
+                super.dispatchTouchEvent(ev)
2022
+            }
2023
+        }
2017
         return if (canClickFlag || !NetworkUtils.isAvailable(this)) {
2024
         return if (canClickFlag || !NetworkUtils.isAvailable(this)) {
2018
             super.dispatchTouchEvent(ev)
2025
             super.dispatchTouchEvent(ev)
2019
         } else {
2026
         } else {

Loading…
Cancel
Save