Java Code Examples for android.view.accessibility.AccessibilityEvent#appendRecord()

The following examples show how to use android.view.accessibility.AccessibilityEvent#appendRecord() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AdapterView.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
/** @hide */
@Override
public boolean onRequestSendAccessibilityEventInternal(View child, AccessibilityEvent event) {
    if (super.onRequestSendAccessibilityEventInternal(child, event)) {
        // Add a record for ourselves as well.
        AccessibilityEvent record = AccessibilityEvent.obtain();
        onInitializeAccessibilityEvent(record);
        // Populate with the text of the requesting child.
        child.dispatchPopulateAccessibilityEvent(record);
        event.appendRecord(record);
        return true;
    }
    return false;
}
 
Example 2
Source File: IcsAdapterView.java    From CSipSimple with GNU General Public License v3.0 5 votes vote down vote up
@Override
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
    if (super.onRequestSendAccessibilityEvent(child, event)) {
        // Add a record for ourselves as well.
        AccessibilityEvent record = AccessibilityEvent.obtain();
        onInitializeAccessibilityEvent(record);
        // Populate with the text of the requesting child.
        child.dispatchPopulateAccessibilityEvent(record);
        event.appendRecord(record);
        return true;
    }
    return false;
}
 
Example 3
Source File: AdapterView.java    From letv with Apache License 2.0 5 votes vote down vote up
@TargetApi(14)
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
    if (!super.onRequestSendAccessibilityEvent(child, event)) {
        return false;
    }
    AccessibilityEvent record = AccessibilityEvent.obtain();
    onInitializeAccessibilityEvent(record);
    child.dispatchPopulateAccessibilityEvent(record);
    event.appendRecord(record);
    return true;
}
 
Example 4
Source File: AdapterView.java    From android-tv-launcher with MIT License 5 votes vote down vote up
public boolean onRequestSendAccessibilityEvent(View paramView, AccessibilityEvent paramAccessibilityEvent) {
	if (super.onRequestSendAccessibilityEvent(paramView, paramAccessibilityEvent)) {
		AccessibilityEvent localAccessibilityEvent = AccessibilityEvent.obtain();
		onInitializeAccessibilityEvent(localAccessibilityEvent);
		paramView.dispatchPopulateAccessibilityEvent(localAccessibilityEvent);
		paramAccessibilityEvent.appendRecord(localAccessibilityEvent);
		return true;
	}
	return false;
}
 
Example 5
Source File: IcsAdapterView.java    From android-apps with MIT License 5 votes vote down vote up
@Override
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
    if (super.onRequestSendAccessibilityEvent(child, event)) {
        // Add a record for ourselves as well.
        AccessibilityEvent record = AccessibilityEvent.obtain();
        onInitializeAccessibilityEvent(record);
        // Populate with the text of the requesting child.
        child.dispatchPopulateAccessibilityEvent(record);
        event.appendRecord(record);
        return true;
    }
    return false;
}
 
Example 6
Source File: AdapterView.java    From Klyph with MIT License 5 votes vote down vote up
@TargetApi(14)
@Override
public boolean onRequestSendAccessibilityEvent( View child, AccessibilityEvent event ) {
	if ( super.onRequestSendAccessibilityEvent( child, event ) ) {
		// Add a record for ourselves as well.
		AccessibilityEvent record = AccessibilityEvent.obtain();
		onInitializeAccessibilityEvent( record );
		// Populate with the text of the requesting child.
		child.dispatchPopulateAccessibilityEvent( record );
		event.appendRecord( record );
		return true;
	}
	return false;
}
 
Example 7
Source File: IcsAdapterView.java    From zen4android with MIT License 5 votes vote down vote up
@Override
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
    if (super.onRequestSendAccessibilityEvent(child, event)) {
        // Add a record for ourselves as well.
        AccessibilityEvent record = AccessibilityEvent.obtain();
        onInitializeAccessibilityEvent(record);
        // Populate with the text of the requesting child.
        child.dispatchPopulateAccessibilityEvent(record);
        event.appendRecord(record);
        return true;
    }
    return false;
}
 
Example 8
Source File: IcsAdapterView.java    From zhangshangwuda with Apache License 2.0 5 votes vote down vote up
@Override
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
    if (super.onRequestSendAccessibilityEvent(child, event)) {
        // Add a record for ourselves as well.
        AccessibilityEvent record = AccessibilityEvent.obtain();
        onInitializeAccessibilityEvent(record);
        // Populate with the text of the requesting child.
        child.dispatchPopulateAccessibilityEvent(record);
        event.appendRecord(record);
        return true;
    }
    return false;
}
 
Example 9
Source File: TaskListView.java    From codeexamples-android with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * This method will fire whenever a child event wants to send an AccessibilityEvent.  As a
 * result, it's a great place to add more AccessibilityRecords, if you want.  In this case,
 * the code is grabbing the position of the item in the list, and assuming that to be the
 * priority for the task.
 */
@Override
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
    // Add a record for ourselves as well.
    AccessibilityEvent record = AccessibilityEvent.obtain();
    super.onInitializeAccessibilityEvent(record);

    int priority = (Integer) child.getTag();
    String priorityStr = "Priority: " + priority;
    record.setContentDescription(priorityStr);

    event.appendRecord(record);
    return true;
}
 
Example 10
Source File: IcsAdapterView.java    From Libraries-for-Android-Developers with MIT License 5 votes vote down vote up
@Override
public boolean onRequestSendAccessibilityEvent(View child, AccessibilityEvent event) {
    if (super.onRequestSendAccessibilityEvent(child, event)) {
        // Add a record for ourselves as well.
        AccessibilityEvent record = AccessibilityEvent.obtain();
        onInitializeAccessibilityEvent(record);
        // Populate with the text of the requesting child.
        child.dispatchPopulateAccessibilityEvent(record);
        event.appendRecord(record);
        return true;
    }
    return false;
}
 
Example 11
Source File: AccessibilityEventCompatIcs.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
public static void appendRecord(AccessibilityEvent event, Object record) {
    event.appendRecord((AccessibilityRecord) record);
}
 
Example 12
Source File: AccessibilityEventCompatIcs.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
public static void appendRecord(AccessibilityEvent event, Object record) {
    event.appendRecord((AccessibilityRecord) record);
}
 
Example 13
Source File: AccessibilityEventCompatIcs.java    From V.FlyoutTest with MIT License 4 votes vote down vote up
public static void appendRecord(AccessibilityEvent event, Object record) {
    event.appendRecord((AccessibilityRecord) record);
}
 
Example 14
Source File: AccessibilityEventCompatIcs.java    From guideshow with MIT License 4 votes vote down vote up
public static void appendRecord(AccessibilityEvent event, Object record) {
    event.appendRecord((AccessibilityRecord) record);
}