Search in sources :

Example 6 with AccessibilityRecordCompat

use of android.support.v4.view.accessibility.AccessibilityRecordCompat in project DiscreteScrollView by yarolegovich.

the class DiscreteScrollLayoutManager method onInitializeAccessibilityEvent.

@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
    super.onInitializeAccessibilityEvent(event);
    if (getChildCount() > 0) {
        final AccessibilityRecordCompat record = AccessibilityEventCompat.asRecord(event);
        record.setFromIndex(getPosition(getFirstChild()));
        record.setToIndex(getPosition(getLastChild()));
    }
}
Also used : AccessibilityRecordCompat(android.support.v4.view.accessibility.AccessibilityRecordCompat)

Aggregations

AccessibilityRecordCompat (android.support.v4.view.accessibility.AccessibilityRecordCompat)6 AccessibilityEvent (android.view.accessibility.AccessibilityEvent)4 Context (android.content.Context)1 AccessibilityManager (android.view.accessibility.AccessibilityManager)1