List of usage examples for android.view.accessibility AccessibilityNodeInfo setScrollable
public void setScrollable(boolean scrollable)
From source file:com.tasomaniac.openwith.resolver.ResolverDrawerLayout.java
@SuppressWarnings("deprecation") @SuppressLint("InlinedApi") @Override//from w w w. j ava 2 s . c o m public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(ResolverDrawerLayout.class.getName()); if (isEnabled()) { if (mCollapseOffset != 0) { info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD); info.setScrollable(true); } } }
From source file:com.actionbarsherlock.internal.widget.IcsAdapterView.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setScrollable(isScrollableForAccessibility()); View selectedView = getSelectedView(); if (selectedView != null) { info.setEnabled(selectedView.isEnabled()); }/*from ww w. j av a 2 s . com*/ }
From source file:android.widget.Gallery.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(Gallery.class.getName()); info.setScrollable(mItemCount > 1); if (isEnabled()) { if (mItemCount > 0 && mSelectedPosition < mItemCount - 1) { info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD); }//from ww w. j av a 2 s . co m if (isEnabled() && mItemCount > 0 && mSelectedPosition > 0) { info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD); } } }
From source file:com.android.launcher2.PagedView.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setScrollable(getPageCount() > 1); if (getCurrentPage() < getPageCount() - 1) { info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD); }//from w ww. j a v a2s .c o m if (getCurrentPage() > 0) { info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD); } }
From source file:cc.flydev.launcher.Page.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setScrollable(getPageCount() > 1); if (getCurrentPage() < getPageCount() - 1) { info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD); }/*w w w . j a v a 2 s . c o m*/ if (getCurrentPage() > 0) { info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD); } }
From source file:com.android.internal.widget.ViewPager.java
@Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.setClassName(ViewPager.class.getName()); info.setScrollable(canScroll()); if (canScrollHorizontally(1)) { info.addAction(AccessibilityAction.ACTION_SCROLL_FORWARD); info.addAction(AccessibilityAction.ACTION_SCROLL_RIGHT); }// w w w . ja va2 s . c o m if (canScrollHorizontally(-1)) { info.addAction(AccessibilityAction.ACTION_SCROLL_BACKWARD); info.addAction(AccessibilityAction.ACTION_SCROLL_LEFT); } }