本文整理汇总了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());
}
}
示例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);
}
};
}
示例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 );
}
}
示例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());
}
}
示例5: obtain
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static Object obtain() {
return AccessibilityRecord.obtain();
}
示例6: getAddedCount
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getAddedCount(Object record) {
return ((AccessibilityRecord) record).getAddedCount();
}
示例7: getBeforeText
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static CharSequence getBeforeText(Object record) {
return ((AccessibilityRecord) record).getBeforeText();
}
示例8: getClassName
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static CharSequence getClassName(Object record) {
return ((AccessibilityRecord) record).getClassName();
}
示例9: getContentDescription
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static CharSequence getContentDescription(Object record) {
return ((AccessibilityRecord) record).getContentDescription();
}
示例10: getCurrentItemIndex
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getCurrentItemIndex(Object record) {
return ((AccessibilityRecord) record).getCurrentItemIndex();
}
示例11: getFromIndex
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getFromIndex(Object record) {
return ((AccessibilityRecord) record).getFromIndex();
}
示例12: getItemCount
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getItemCount(Object record) {
return ((AccessibilityRecord) record).getItemCount();
}
示例13: getParcelableData
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static Parcelable getParcelableData(Object record) {
return ((AccessibilityRecord) record).getParcelableData();
}
示例14: getRemovedCount
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getRemovedCount(Object record) {
return ((AccessibilityRecord) record).getRemovedCount();
}
示例15: getScrollX
import android.view.accessibility.AccessibilityRecord; //导入依赖的package包/类
public static int getScrollX(Object record) {
return ((AccessibilityRecord) record).getScrollX();
}