My app uses one Activity to host several fragments. Each time one fragment is shown on the phone screen.The view of each fragment consists of several image icons.

Currently, user is able to press on two icons simultaneously with two fingers (with each fingure press on one icon). I want to disable this multi-touch feature on my app to allow only one icon press take effect at a time.

I tried the following ways:

Way 1: in my app theme, I added:

<item name="android:windowEnableSplitTouch">false</item>

Way 2: In Android Manifest xml, I added:

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

Way 3: in my Activity:

@Override
public boolean onTouchEvent(MotionEvent event) {

    if(event.getPointerCount() > 1) {
        System.out.println("Multitouch detected!");
        return true;
    }
    else
       return super.onTouchEvent(event);
    }

Unfortunately, none of my solutions work. So, How can I disable multi-touch feature in my app??

Edit
Report