当前位置: 首页>>代码示例>>Java>>正文


Java AccessibilityRecord类代码示例

本文整理汇总了Java中android.view.accessibility.AccessibilityRecord的典型用法代码示例。如果您正苦于以下问题:Java AccessibilityRecord类的具体用法?Java AccessibilityRecord怎么用?Java AccessibilityRecord使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AccessibilityRecord类属于android.view.accessibility包,在下文中一共展示了AccessibilityRecord类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
/**
 * Called by the accessibility delegate to initialize an accessibility event.
 * <p>
 * Default implementation adds item count and scroll information to the event.
 *
 * @param recycler The Recycler that can be used to convert view positions into adapter
 *                 positions
 * @param state    The current state of RecyclerView
 * @param event    The event instance to initialize
 * @see View#onInitializeAccessibilityEvent(android.view.accessibility.AccessibilityEvent)
 */
public void onInitializeAccessibilityEvent(Recycler recycler, State state,
                                           AccessibilityEvent event) {
	final AccessibilityRecord record = event.getRecord(0);
	if (mRecyclerView == null || record == null) {
		return;
	}
	record.setScrollable(mRecyclerView.canScrollVertically(1)
			|| mRecyclerView.canScrollVertically(-1)
			|| mRecyclerView.canScrollHorizontally(-1)
			|| mRecyclerView.canScrollHorizontally(1));

	if (mRecyclerView.mAdapter != null) {
		record.setItemCount(mRecyclerView.mAdapter.getItemCount());
	}
}
 
开发者ID:fython-tools,项目名称:NyanpasuTile,代码行数:27,代码来源:RecyclerView.java

示例2: type

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static SubjectFactory<AccessibilityRecordSubject, AccessibilityRecord> type() {
  return new SubjectFactory<AccessibilityRecordSubject, AccessibilityRecord>() {
    @Override
    public AccessibilityRecordSubject getSubject(FailureStrategy fs, AccessibilityRecord that) {
      return new AccessibilityRecordSubject(fs, that);
    }
  };
}
 
开发者ID:pkware,项目名称:truth-android,代码行数:9,代码来源:AccessibilityRecordSubject.java

示例3: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
@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 );
    }
}
 
开发者ID:AppLovin,项目名称:Android-SDK-Demo,代码行数:16,代码来源:SdkCenteredViewPager.java

示例4: onInitializeAccessibilityEvent

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
@Override
public void onInitializeAccessibilityEvent(AccessibilityEvent event) {
	super.onInitializeAccessibilityEvent(event);
	if (getChildCount() > 0) {
		final AccessibilityRecord record = event.getRecord(0);
		record.setFromIndex(findFirstVisibleItemPosition());
		record.setToIndex(findLastVisibleItemPosition());
	}
}
 
开发者ID:fython-tools,项目名称:NyanpasuTile,代码行数:10,代码来源:LinearLayoutManager.java

示例5: obtain

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static Object obtain() {
    return AccessibilityRecord.obtain();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java

示例6: getAddedCount

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getAddedCount(Object record) {
    return ((AccessibilityRecord) record).getAddedCount();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java

示例7: getBeforeText

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static CharSequence getBeforeText(Object record) {
    return ((AccessibilityRecord) record).getBeforeText();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java

示例8: getClassName

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static CharSequence getClassName(Object record) {
    return ((AccessibilityRecord) record).getClassName();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java

示例9: getContentDescription

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static CharSequence getContentDescription(Object record) {
    return ((AccessibilityRecord) record).getContentDescription();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java

示例10: getCurrentItemIndex

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getCurrentItemIndex(Object record) {
    return ((AccessibilityRecord) record).getCurrentItemIndex();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java

示例11: getFromIndex

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getFromIndex(Object record) {
    return ((AccessibilityRecord) record).getFromIndex();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java

示例12: getItemCount

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getItemCount(Object record) {
    return ((AccessibilityRecord) record).getItemCount();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java

示例13: getParcelableData

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static Parcelable getParcelableData(Object record) {
    return ((AccessibilityRecord) record).getParcelableData();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java

示例14: getRemovedCount

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getRemovedCount(Object record) {
    return ((AccessibilityRecord) record).getRemovedCount();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java

示例15: getScrollX

import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getScrollX(Object record) {
    return ((AccessibilityRecord) record).getScrollX();
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:4,代码来源:AccessibilityRecordCompatIcs.java


注:本文中的android.view.accessibility.AccessibilityRecord类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。