Example usage for android.view.accessibility AccessibilityEvent getMovementGranularity

List of usage examples for android.view.accessibility AccessibilityEvent getMovementGranularity

Introduction

In this page you can find the example usage for android.view.accessibility AccessibilityEvent getMovementGranularity.

Prototype

public int getMovementGranularity() 

Source Link

Document

Gets the movement granularity that was traversed.

Usage

From source file:com.android.utils.AccessibilityEventUtils.java

public static boolean isCharacterTraversalEvent(AccessibilityEvent event) {
    return (event.getEventType() == AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
            && event.getMovementGranularity() == AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_CHARACTER);
}

From source file:com.android.screenspeak.eventprocessor.ProcessorPhoneticLetters.java

private boolean isCharacterTraversalEvent(AccessibilityEvent event) {
    return (event.getEventType() == AccessibilityEvent.TYPE_VIEW_TEXT_TRAVERSED_AT_MOVEMENT_GRANULARITY
            && event.getMovementGranularity() == AccessibilityNodeInfoCompat.MOVEMENT_GRANULARITY_CHARACTER);
}