Disabling multi-touch of my application

For some reason, I have to disable the multi-touch feature in my application. The user can only press one button at a time, or the application crashes. Is there a way to implement this requirement?

Thanks a lot!

+6
source share
2 answers

To prevent this, you should disable the splitMotionEvents or windowEnableSplitTouch attribute inside the ViewGroup. are located.

android:splitMotionEvents="false" 
+20
source

add this line to your manifest

 < uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false" /> 
0
source

Source: https://habr.com/ru/post/920017/


All Articles