Freigeben über


View.SystemGestureExclusionRects Property

Definition

Retrieve the list of areas within this view's post-layout coordinate space where the system should not intercept touch or other pointing device gestures. -or- Sets a list of areas within this view's post-layout 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

the list set by #setSystemGestureExclusionRects(List)

Attributes

Remarks

Property getter documentation:

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

Do not modify the returned list.

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

Property setter documentation:

Sets a list of areas within this view's post-layout coordinate space where the system should not intercept touch or other pointing device gestures. <em>This method should be called by #onLayout(boolean, int, int, int, int) or #onDraw(Canvas).</em>

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.

Note: the system will put a limit of 200dp on the vertical extent of the exclusions it takes into account. The limit does not apply while the navigation bar is #SYSTEM_UI_FLAG_IMMERSIVE_STICKY stickily hidden, nor to the android.inputmethodservice.InputMethodService input method and Intent#CATEGORY_HOME home activity.

Java documentation for android.view.View.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