Compartir a través de


Window.SystemGestureExclusionRects Property

Definition

Retrieve the list of areas within this window's coordinate space where the system should not intercept touch or other pointing device gestures. -or- Sets a list of areas within this window's coordinate space where the system should not intercept touch or other pointing device gestures.

public virtual System.Collections.Generic.IList<Android.Graphics.Rect> SystemGestureExclusionRects { [Android.Runtime.Register("getSystemGestureExclusionRects", "()Ljava/util/List;", "GetGetSystemGestureExclusionRectsHandler", ApiSince=29)] get; [Android.Runtime.Register("setSystemGestureExclusionRects", "(Ljava/util/List;)V", "GetSetSystemGestureExclusionRects_Ljava_util_List_Handler", ApiSince=29)] set; }
[<get: Android.Runtime.Register("getSystemGestureExclusionRects", "()Ljava/util/List;", "GetGetSystemGestureExclusionRectsHandler", ApiSince=29)>]
[<set: Android.Runtime.Register("setSystemGestureExclusionRects", "(Ljava/util/List;)V", "GetSetSystemGestureExclusionRects_Ljava_util_List_Handler", ApiSince=29)>]
member this.SystemGestureExclusionRects : System.Collections.Generic.IList<Android.Graphics.Rect> with get, set

Property Value

a list of system gesture exclusion rects specific to this window

Attributes

Remarks

Property getter documentation:

Retrieve the list of areas within this window's coordinate space where the system should not intercept touch or other pointing device gestures. This is the list as set by #setSystemGestureExclusionRects(List) or an empty list if #setSystemGestureExclusionRects(List) has not been called. It does not include exclusion rects set by this window's view hierarchy.

Java documentation for android.view.Window.getSystemGestureExclusionRects().

Property setter documentation:

Sets a list of areas within this window's coordinate space where the system should not intercept touch or other pointing device gestures.

This method should be used by apps that make use of #takeSurface(SurfaceHolder.Callback2) and do not have a view hierarchy available. Apps that do have a view hierarchy should use View#setSystemGestureExclusionRects(List) instead. This method does not modify or replace the gesture exclusion rects populated by individual views in this window's view hierarchy using View#setSystemGestureExclusionRects(List).

Use this to tell the system which specific sub-areas of a view need to receive gesture input in order to function correctly in the presence of global system gestures that may conflict. For example, if the system wishes to capture swipe-in-from-screen-edge gestures to provide system-level navigation functionality, a view such as a navigation drawer container can mark the left (or starting) edge of itself as requiring gesture capture priority using this API. The system may then choose to relax its own gesture recognition to allow the app to consume the user's gesture. It is not necessary for an app to register exclusion rects for broadly spanning regions such as the entirety of a ScrollView or for simple press and release click targets such as Button. Mark an exclusion rect when interacting with a view requires a precision touch gesture in a small area in either the X or Y dimension, such as an edge swipe or dragging a SeekBar thumb.

Do not modify the provided list after this method is called.

Java documentation for android.view.Window.setSystemGestureExclusionRects(java.util.List<android.graphics.Rect>).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to