android.support.v4.view
Class ViewGroupCompat

java.lang.Object
  extended by android.support.v4.view.ViewGroupCompat

public class ViewGroupCompat
extends Object

Helper for accessing features in ViewGroup introduced after API level 4 in a backwards compatible fashion.


Method Summary
static boolean onRequestSendAccessibilityEvent(android.view.ViewGroup group, android.view.View child, android.view.accessibility.AccessibilityEvent event)
          Called when a child has requested sending an AccessibilityEvent and gives an opportunity to its parent to augment the event.
static void setMotionEventSplittingEnabled(android.view.ViewGroup group, boolean split)
          Enable or disable the splitting of MotionEvents to multiple children during touch event dispatch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

onRequestSendAccessibilityEvent

public static boolean onRequestSendAccessibilityEvent(android.view.ViewGroup group,
                                                      android.view.View child,
                                                      android.view.accessibility.AccessibilityEvent event)
Called when a child has requested sending an AccessibilityEvent and gives an opportunity to its parent to augment the event.

If an AccessibilityDelegateCompat has been specified via calling ViewCompat.setAccessibilityDelegate(View, AccessibilityDelegateCompat) its AccessibilityDelegateCompat.onRequestSendAccessibilityEvent(ViewGroup, View, AccessibilityEvent) is responsible for handling this call.

Parameters:
group - The group whose method to invoke.
child - The child which requests sending the event.
event - The event to be sent.
Returns:
True if the event should be sent.

setMotionEventSplittingEnabled

public static void setMotionEventSplittingEnabled(android.view.ViewGroup group,
                                                  boolean split)
Enable or disable the splitting of MotionEvents to multiple children during touch event dispatch. This behavior is enabled by default for applications that target an SDK version of 11 (Honeycomb) or newer. On earlier platform versions this feature was not supported and this method is a no-op.

When this option is enabled MotionEvents may be split and dispatched to different child views depending on where each pointer initially went down. This allows for user interactions such as scrolling two panes of content independently, chording of buttons, and performing independent gestures on different pieces of content.

Parameters:
group - ViewGroup to modify
split - true to allow MotionEvents to be split and dispatched to multiple child views. false to only allow one child view to be the target of any MotionEvent received by this ViewGroup.


Copyright © 2013 Marek Kedzierski. All Rights Reserved.