Java Code Examples for android.view.accessibility.AccessibilityRecord#obtain()

The following examples show how to use android.view.accessibility.AccessibilityRecord#obtain() . 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: SdkCenteredViewPager.java    From Android-SDK-Demo with MIT License 5 votes vote down vote up
@Override
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event)
{
    super.onInitializeAccessibilityEvent( host, event );
    event.setClassName( SdkCenteredViewPager.class.getName() );
    final AccessibilityRecord recordCompat = AccessibilityRecord.obtain();
    recordCompat.setScrollable( canScroll() );
    if ( event.getEventType() == AccessibilityEvent.TYPE_VIEW_SCROLLED
            && mAdapter != null )
    {
        recordCompat.setItemCount( mAdapter.getCount() );
        recordCompat.setFromIndex( mCurItem );
        recordCompat.setToIndex( mCurItem );
    }
}
 
Example 2
Source File: SdkCenteredViewPager.java    From Android-SDK-Demo with MIT License 5 votes vote down vote up
@Override
public void onInitializeAccessibilityEvent(View host, AccessibilityEvent event)
{
    super.onInitializeAccessibilityEvent( host, event );
    event.setClassName( SdkCenteredViewPager.class.getName() );
    final AccessibilityRecord recordCompat = AccessibilityRecord.obtain();
    recordCompat.setScrollable( canScroll() );
    if ( event.getEventType() == AccessibilityEvent.TYPE_VIEW_SCROLLED
            && mAdapter != null )
    {
        recordCompat.setItemCount( mAdapter.getCount() );
        recordCompat.setFromIndex( mCurItem );
        recordCompat.setToIndex( mCurItem );
    }
}
 
Example 3
Source File: AccessibilityRecordCompatIcs.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
public static Object obtain() {
    return AccessibilityRecord.obtain();
}
 
Example 4
Source File: AccessibilityRecordCompatIcs.java    From CodenameOne with GNU General Public License v2.0 4 votes vote down vote up
public static Object obtain(Object record) {
    return AccessibilityRecord.obtain((AccessibilityRecord) record);
}
 
Example 5
Source File: AccessibilityRecordCompatIcs.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
public static Object obtain() {
    return AccessibilityRecord.obtain();
}
 
Example 6
Source File: AccessibilityRecordCompatIcs.java    From adt-leanback-support with Apache License 2.0 4 votes vote down vote up
public static Object obtain(Object record) {
    return AccessibilityRecord.obtain((AccessibilityRecord) record);
}
 
Example 7
Source File: AccessibilityRecordCompatIcs.java    From V.FlyoutTest with MIT License 4 votes vote down vote up
public static Object obtain() {
    return AccessibilityRecord.obtain();
}
 
Example 8
Source File: AccessibilityRecordCompatIcs.java    From V.FlyoutTest with MIT License 4 votes vote down vote up
public static Object obtain(Object record) {
    return AccessibilityRecord.obtain((AccessibilityRecord) record);
}
 
Example 9
Source File: AccessibilityRecordCompatIcs.java    From guideshow with MIT License 4 votes vote down vote up
public static Object obtain() {
    return AccessibilityRecord.obtain();
}
 
Example 10
Source File: AccessibilityRecordCompatIcs.java    From guideshow with MIT License 4 votes vote down vote up
public static Object obtain(Object record) {
    return AccessibilityRecord.obtain((AccessibilityRecord) record);
}