Split touch events
来源:互联网 发布:淘宝帐号怎么注销 编辑:程序博客网 时间:2024/05/23 01:25
Split touch events
Previously, only a single view could accept touch events at onetime. Android 3.0 adds support for splitting touch events acrossviews and even windows, so different views can accept simultaneoustouch events.
Split touch events is enabled by default when an application targets Android 3.0. That is, when the application has set eithertheandroid:minSdkVersion
or android:targetSdkVersion
attribute's value to"11"
.
However, the following properties allow you to disable splittouch events across views inside specific view groups and acrosswindows.
- The
android:splitMotionEvents
attribute for view groups allows you to disable split touch eventsthat occur between child views in a layout. For example:<LinearLayout android:splitMotionEvents="false" ... > ... </LinearLayout>
This way, child views in the linear layout cannot split touchevents—only one view can receive touch events at a time.
- The
android:windowEnableSplitTouch
style property allows you to disable split touch events acrosswindows, by applying it to a theme for the activity or entireapplication. For example:<style name="NoSplitMotionEvents" parent="android:Theme.Holo"> <item name="android:windowEnableSplitTouch">false</item> ... </style>
When this theme is applied to an
<activity>
or<application>
,only touch events within the current activity window are accepted.For example, by disabling split touch events across windows, thesystem bar cannot receive touch events at the same time as theactivity. This doesnot affect whether views inside theactivity can split touch events—by default, the activity can stillsplit touch events across views.For more information about creating a theme, read Applying Styles andThemes.
- Split touch events
- Android Split touch events 禁用多点触控
- Android Split touch events 禁用多点触控
- Touch Events and UIResponder
- starling教程-触摸事件(Touch Events)
- Responding to Touch Events 响应触摸事件
- starling教程-触摸事件(Touch Events)
- [随手] Linux split du touch
- Using Touch Gestures 》Managing Touch Events in a ViewGroup
- 处理多点触控事件Handling Multi-Touch Events
- 处理多点触控事件Handling Multi-Touch Events
- 第十二天(Understanding and Using Events in Sencha Touch)
- Faking Touch Events on iOS for Fun and Profit
- android--Touch Events 你应该记住的一些事
- Understanding Android Input Touch Events System Framework (dispatchTouchEvent, onInterceptTouchEvent
- 第12张 Touch Events and UIResponder翻译
- EVENTS
- Events
- Struts2中result-type详解(三)
- 第十四周项目二(3)从文件读取成绩,并输出成绩单
- NVMain运行机制深入了解之四
- 变量命名规则
- Java---01---初识
- Split touch events
- HDU 4135-Co-prime(容斥原理)
- 成为一个懒惰的程序员
- 人生就像五谷杂粮酿造的酒,不同的人有不一样的感觉
- mac 下git命令自动补全设置
- erlang iolist
- EF-实体对象建立Dome
- 【Android 应用开发】 自定义组件 宽高适配方法, 手势监听器操作组件, 回调接口维护策略, 绘制方法分析 -- 基于 WheelView 组件分析自定义组件
- effective c++ 条款03 整理