在application引用的Theme中添加以下代码:
<item name="android:windowEnableSplitTouch">false</item>
<item name="android:splitMotionEvents">false</item>
这个属性,就可以完美解决这个问题.
<item name="android:windowEnableSplitTouch">false</item>
<item name="android:splitMotionEvents">false</item>
可以禁用全局多点触控,如果要单独弄,则在需要的xml添加
下面是示例源码
- <!-- 应用所有界面样式,无标题栏,禁用多点触控 -->
- <style name="App_NoTitleBar" parent="android:Theme">
- <item name="android:windowNoTitle">true</item>
- <item name="android:windowEnableSplitTouch">false</item>
- <item name="android:splitMotionEvents">false</item>
- </style>
- <!-- 应用所有界面样式,无标题栏,禁用多点触控 -->
- <style name="App_NoTitleBar" parent="android:Theme">
- <item name="android:windowNoTitle">true</item>
- <item name="android:windowEnableSplitTouch">false</item>
- <item name="android:splitMotionEvents">false</item>
- </style>
android -布局控件禁用多点触控
只需要在外面Layout中设置
- android:splitMotionEvents="false"
这个属性,就可以完美解决这个问题.
参考文章:
http://blog.csdn.net/aikongmeng/article/details/42238285