List of usage examples for android.view.accessibility AccessibilityEvent setScrollable
public void setScrollable(boolean scrollable)
From source file:com.actionbarsherlock.internal.widget.IcsAdapterView.java
@Override public void onInitializeAccessibilityEvent(AccessibilityEvent event) { super.onInitializeAccessibilityEvent(event); event.setScrollable(isScrollableForAccessibility()); View selectedView = getSelectedView(); if (selectedView != null) { event.setEnabled(selectedView.isEnabled()); }//from www .java 2 s. c o m event.setCurrentItemIndex(getSelectedItemPosition()); event.setFromIndex(getFirstVisiblePosition()); event.setToIndex(getLastVisiblePosition()); event.setItemCount(getCount()); }
From source file:com.android.launcher2.PagedView.java
@Override public void onInitializeAccessibilityEvent(AccessibilityEvent event) { super.onInitializeAccessibilityEvent(event); event.setScrollable(true); if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_SCROLLED) { event.setFromIndex(mCurrentPage); event.setToIndex(mCurrentPage);/*from ww w. j av a 2 s. co m*/ event.setItemCount(getChildCount()); } }
From source file:cc.flydev.launcher.Page.java
@Override public void onInitializeAccessibilityEvent(AccessibilityEvent event) { super.onInitializeAccessibilityEvent(event); event.setScrollable(true); }
From source file:com.android.internal.widget.ViewPager.java
@Override public void onInitializeAccessibilityEvent(AccessibilityEvent event) { super.onInitializeAccessibilityEvent(event); event.setClassName(ViewPager.class.getName()); event.setScrollable(canScroll()); if (event.getEventType() == AccessibilityEvent.TYPE_VIEW_SCROLLED && mAdapter != null) { event.setItemCount(mAdapter.getCount()); event.setFromIndex(mCurItem);/* w w w . j ava2s .co m*/ event.setToIndex(mCurItem); } }