added in version 22.1.0
belongs to Maven artifact


public final class ViewGroupCompat
extends Object


Helper for accessing features in ViewGroup.




This constant is a layoutMode.


This constant is a layoutMode.

Public methods

static int getLayoutMode(ViewGroup group)

Returns the basis of alignment during layout operations on this ViewGroup: either LAYOUT_MODE_CLIP_BOUNDS or LAYOUT_MODE_OPTICAL_BOUNDS.

static int getNestedScrollAxes(ViewGroup group)

Return the current axes of nested scrolling for this ViewGroup.

static boolean isTransitionGroup(ViewGroup group)

Returns true if this ViewGroup should be considered as a single entity for removal when executing an Activity transition.

static boolean onRequestSendAccessibilityEvent(ViewGroup group, View child, AccessibilityEvent event)

This method was deprecated in API level 26.1.0. Use onRequestSendAccessibilityEvent(View, AccessibilityEvent) directly.

static void setLayoutMode(ViewGroup group, int mode)

Sets the basis of alignment during the layout of this ViewGroup.

static void setMotionEventSplittingEnabled(ViewGroup group, boolean split)

This method was deprecated in API level 26.1.0. Use setMotionEventSplittingEnabled(boolean) directly.

static void setTransitionGroup(ViewGroup group, boolean isTransitionGroup)

Changes whether or not this ViewGroup should be treated as a single entity during Activity Transitions.

Inherited methods

From class java.lang.Object