List of usage examples for android.view.accessibility AccessibilityNodeInfo ACTION_SCROLL_FORWARD
int ACTION_SCROLL_FORWARD
To view the source code for android.view.accessibility AccessibilityNodeInfo ACTION_SCROLL_FORWARD.
Click Source Link
From source file:com.tasomaniac.openwith.resolver.ResolverDrawerLayout.java
@SuppressWarnings("deprecation") @SuppressLint("InlinedApi") @Override//from w w w . j a v a 2 s . co 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.tasomaniac.openwith.resolver.ResolverDrawerLayout.java
@Override public boolean performAccessibilityAction(int action, Bundle arguments) { if (super.performAccessibilityAction(action, arguments)) { return true; }/* w ww .ja va 2s . co m*/ if (action == AccessibilityNodeInfo.ACTION_SCROLL_FORWARD && mCollapseOffset != 0) { smoothScrollTo(0, 0); return true; } return false; }
From source file:com.google.android.marvin.mytalkback.ProcessorFocusAndSingleTap.java
/** * Listens to accessibility actions performed by the parent service. * * @param action The action performed.//from w w w . ja v a2 s . c om */ public void onActionPerformed(int action) { switch (action) { case AccessibilityNodeInfo.ACTION_SCROLL_FORWARD: case AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD: setScrollActionImmediately(action); break; } }
From source file:cc.flydev.launcher.Page.java
private void sendScrollAccessibilityEvent() { AccessibilityManager am = (AccessibilityManager) getContext() .getSystemService(Context.ACCESSIBILITY_SERVICE); if (am.isEnabled()) { AccessibilityEvent ev = AccessibilityEvent.obtain(AccessibilityEvent.TYPE_VIEW_SCROLLED); ev.setItemCount(getChildCount()); ev.setFromIndex(mCurrentPage);/*w ww .ja v a 2 s . co m*/ final int action; if (getNextPage() >= mCurrentPage) { action = AccessibilityNodeInfo.ACTION_SCROLL_FORWARD; } else { action = AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD; } ev.setAction(action); sendAccessibilityEventUnchecked(ev); } }
From source file:com.android.screenspeak.eventprocessor.ProcessorFocusAndSingleTap.java
/** * Listens for scroll events./*ww w.j a va 2 s . co m*/ * * @param action The type of scroll event received. */ @Override public void onScroll(AccessibilityNodeInfoCompat scrolledNode, int action) { if (scrolledNode == null) { clearScrollAction(); } switch (action) { case AccessibilityNodeInfo.ACTION_SCROLL_FORWARD: case AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD: mLastScrollAction = action; if (mActionScrolledNode != null) { mActionScrolledNode.recycle(); } if (scrolledNode != null) { mActionScrolledNode = AccessibilityNodeInfoCompat.obtain(scrolledNode); } break; } }
From source file:com.android.yijiang.kzx.widget.betterpickers.radialtimepicker.RadialPickerLayout.java
/** * Necessary for accessibility, to ensure we support "scrolling" forward and backward in the circle. *//*from w w w .ja v a2 s. c o m*/ @SuppressLint("NewApi") @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD); info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD); }
From source file:com.codetroopers.betterpickers.radialtimepicker.RadialPickerLayout.java
/** * Necessary for accessibility, to ensure we support "scrolling" forward and backward in the circle. *///from www . j a va 2 s .c o m @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD); info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD); }
From source file:org.holoeverywhere.widget.datetimepicker.time.RadialPickerLayout.java
/** * Necessary for accessibility, to ensure we support "scrolling" forward and backward * in the circle./*from w w w. ja v a 2 s . c om*/ */ @Override @TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD); info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD); }
From source file:com.a.mirko.android.datetimepicker.time.RadialPickerLayout.java
/** * Necessary for accessibility, to ensure we support "scrolling" forward and backward * in the circle.//from www .j ava2s. co m */ public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { if (Build.VERSION.SDK_INT >= 14) { super.onInitializeAccessibilityNodeInfo(info); info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_FORWARD); info.addAction(AccessibilityNodeInfo.ACTION_SCROLL_BACKWARD); } }
From source file:com.googlecode.eyesfree.brailleback.DefaultNavigationMode.java
/** * Checks if the specified node is suitable for autoscrolling and will * try to scroll it if it is./*from w w w. j a v a2s . c o m*/ * Note we might have an issue here when more than one node is on the line * or not the whole list item is visible. */ private boolean autoScrollItem(AccessibilityNodeInfoCompat node, int scrollDirection) { int edgeDirection = (scrollDirection == AccessibilityNodeInfo.ACTION_SCROLL_FORWARD) ? 1 : -1; return AccessibilityNodeInfoUtils.isAutoScrollEdgeListItem(mAccessibilityService, node, edgeDirection) && attemptScrollAction(scrollDirection); }