Android:禁用全局多点触控

在application引用的Theme中添加以下代码:
<item name="android:windowEnableSplitTouch">false</item>
        <item name="android:splitMotionEvents">false</item>

可以禁用全局多点触控,如果要单独弄,则在需要的xml添加

下面是示例源码

[html]  view plain  copy
  1. <!-- 应用所有界面样式,无标题栏,禁用多点触控 -->  
  2.     <style name="App_NoTitleBar" parent="android:Theme">  
  3.         <item name="android:windowNoTitle">true</item>  
  4.         <item name="android:windowEnableSplitTouch">false</item>  
  5.         <item name="android:splitMotionEvents">false</item>  
  6.     </style>  
[html]  view plain  copy
  1. <!-- 应用所有界面样式,无标题栏,禁用多点触控 -->  
  2.     <style name="App_NoTitleBar" parent="android:Theme">  
  3.         <item name="android:windowNoTitle">true</item>  
  4.         <item name="android:windowEnableSplitTouch">false</item>  
  5.         <item name="android:splitMotionEvents">false</item>  
  6.     </style>  


android -布局控件禁用多点触控

只需要在外面Layout中设置

[html]  view plain  copy
  1. android:splitMotionEvents="false"  

这个属性,就可以完美解决这个问题.

参考文章:

http://blog.csdn.net/aikongmeng/article/details/42238285


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值