Merge "docs: add clarification to split touch events" into honeycomb
This commit is contained in:
@@ -717,21 +717,23 @@ href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code android:
|
|||||||
or <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
or <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
|
||||||
android:targetSdkVersion}</a> attribute's value to {@code "11"}.</p>
|
android:targetSdkVersion}</a> attribute's value to {@code "11"}.</p>
|
||||||
|
|
||||||
<p>However, the following properties allow you to disable split touch events for
|
<p>However, the following properties allow you to disable split touch events across views inside
|
||||||
specific view groups, certain activities, or the entire application.</p>
|
specific view groups and across windows.</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>The {@link android.R.attr#splitMotionEvents android:splitMotionEvents} attribute for view groups
|
<li>The {@link android.R.attr#splitMotionEvents android:splitMotionEvents} attribute for view groups
|
||||||
allows you to disable split motion events for the children in a layout. For example:
|
allows you to disable split touch events that occur between child views in a layout. For example:
|
||||||
<pre>
|
<pre>
|
||||||
<LinearLayout android:splitMotionEvents="false" ... >
|
<LinearLayout android:splitMotionEvents="false" ... >
|
||||||
...
|
...
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</pre>
|
</pre>
|
||||||
|
<p>This way, child views in the linear layout cannot split touch events—only one view can
|
||||||
|
receive touch events at a time.</p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>The {@link android.R.attr#windowEnableSplitTouch android:windowEnableSplitTouch} style property
|
<li>The {@link android.R.attr#windowEnableSplitTouch android:windowEnableSplitTouch} style property
|
||||||
allows you to disable split motion events across windows by applying it to a theme for the activity
|
allows you to disable split touch events across windows, by applying it to a theme for the activity
|
||||||
or entire application. For example:
|
or entire application. For example:
|
||||||
<pre>
|
<pre>
|
||||||
<style name="NoSplitMotionEvents" parent="android:Theme.Holo">
|
<style name="NoSplitMotionEvents" parent="android:Theme.Holo">
|
||||||
@@ -744,7 +746,8 @@ href="{@docRoot}guide/topics/manifest/activity-element.html">{@code <activity
|
|||||||
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>,
|
href="{@docRoot}guide/topics/manifest/application-element.html">{@code <application>}</a>,
|
||||||
only touch events within the current activity window are accepted. For example, by disabling split
|
only touch events within the current activity window are accepted. For example, by disabling split
|
||||||
touch events across windows, the system bar cannot receive touch events at the same time as the
|
touch events across windows, the system bar cannot receive touch events at the same time as the
|
||||||
activity.</p>
|
activity. This does <em>not</em> affect whether views inside the activity can split touch
|
||||||
|
events—by default, the activity can still split touch events across views.</p>
|
||||||
|
|
||||||
<p>For more information about creating a theme, read <a
|
<p>For more information about creating a theme, read <a
|
||||||
href="{@docRoot}guide/topics/ui/themes.html">Applying Styles and Themes</a>.</p>
|
href="{@docRoot}guide/topics/ui/themes.html">Applying Styles and Themes</a>.</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user