Java Code Examples for android.support.v4.view.accessibility.AccessibilityNodeInfoCompat#setScrollable()

The following examples show how to use android.support.v4.view.accessibility.AccessibilityNodeInfoCompat#setScrollable() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DirectionalViewpager.java    From ankihelper with GNU General Public License v3.0 6 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(DirectionalViewpager.class.getName());
    info.setScrollable(canScroll());
    if (isHorizontal()) {
        if (canScrollHorizontally(1)) {
            info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
        }
        if (canScrollHorizontally(-1)) {
            info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
        }
    } else {
        if (internalCanScrollVertically(1)) {
            info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
        }
        if (internalCanScrollVertically(-1)) {
            info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
        }
    }
}
 
Example 2
Source File: DirectionalViewpager.java    From BookReader with Apache License 2.0 6 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(DirectionalViewpager.class.getName());
    info.setScrollable(canScroll());
    if (isHorizontal()) {
        if (canScrollHorizontally(1)) {
            info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
        }
        if (canScrollHorizontally(-1)) {
            info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
        }
    } else {
        if (internalCanScrollVertically(1)) {
            info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
        }
        if (internalCanScrollVertically(-1)) {
            info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
        }
    }
}
 
Example 3
Source File: ViewPager.java    From AppCompat-Extension-Library with Apache License 2.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPager.class.getName());
    info.setScrollable(canScroll());
    if (canScrollHorizontally(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (canScrollHorizontally(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 4
Source File: VerticalViewPager.java    From actor-platform with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPager.class.getName());
    info.setScrollable(canScroll());
    if (internalCanScrollVertically(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (internalCanScrollVertically(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 5
Source File: VerticalViewPager.java    From ticdesign with Apache License 2.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPager.class.getName());
    info.setScrollable(canScroll());
    if (internalCanScrollVertically(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (internalCanScrollVertically(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 6
Source File: ViewPagerEx.java    From LoyalNativeSlider with MIT License 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPagerEx.class.getName());
    info.setScrollable(canScroll());
    if (canScrollHorizontally(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (canScrollHorizontally(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 7
Source File: VelocityViewPager.java    From Muzesto with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(VelocityViewPager.class.getName());
    info.setScrollable(canScroll());
    if (canScrollHorizontally(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (canScrollHorizontally(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 8
Source File: ViewPager.java    From CodenameOne with GNU General Public License v2.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPager.class.getName());
    info.setScrollable(canScroll());
    if (canScrollForward()) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (canScrollBackward()) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 9
Source File: ViewPagerCompact.java    From RxZhihuDaily with MIT License 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPager.class.getName());
    info.setScrollable(canScroll());
    if (canScrollHorizontally(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (canScrollHorizontally(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 10
Source File: VerticalViewPager.java    From ankihelper with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPager.class.getName());
    info.setScrollable(canScroll());
    if (internalCanScrollVertically(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (internalCanScrollVertically(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 11
Source File: VerViewPager.java    From likeJDGoodsDetails with Apache License 2.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
	super.onInitializeAccessibilityNodeInfo(host, info);
	info.setClassName(ViewPager.class.getName());
	info.setScrollable(canScroll());
	if (internalCanScrollVertically(1)) {
		info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
	}
	if (internalCanScrollVertically(-1)) {
		info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
	}
}
 
Example 12
Source File: ViewPagerEx.java    From UltimateAndroid with Apache License 2.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPagerEx.class.getName());
    info.setScrollable(canScroll());
    if (canScrollHorizontally(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (canScrollHorizontally(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 13
Source File: ViewPagerCompat.java    From android-project-wo2b with Apache License 2.0 5 votes vote down vote up
@SuppressLint("NewApi")
@Override
      public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
          super.onInitializeAccessibilityNodeInfo(host, info);
          info.setClassName(ViewPager.class.getName());
          info.setScrollable(canScroll());
          if (canScrollHorizontally(1)) {
              info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
          }
          if (canScrollHorizontally(-1)) {
              info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
          }
      }
 
Example 14
Source File: ViewPager.java    From android-movies-demo with MIT License 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPager.class.getName());
    info.setScrollable(canScroll());
    if (canScrollHorizontally(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (canScrollHorizontally(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 15
Source File: YViewPagerNew.java    From YViewPagerDemo with Apache License 2.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(YViewPagerNew.class.getName());
    info.setScrollable(canScroll());
    if (canScrollHorizontally(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (canScrollHorizontally(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 16
Source File: ViewPagerCompat.java    From android-auto-scroll-viewpager with Apache License 2.0 5 votes vote down vote up
@SuppressLint("NewApi")
@Override
      public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
          super.onInitializeAccessibilityNodeInfo(host, info);
          info.setClassName(ViewPager.class.getName());
          info.setScrollable(canScroll());
          if (canScrollHorizontally(1)) {
              info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
          }
          if (canScrollHorizontally(-1)) {
              info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
          }
      }
 
Example 17
Source File: VerticalViewPager.java    From InfiniteCycleViewPager with Apache License 2.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPager.class.getName());
    info.setScrollable(canScroll());
    if (internalCanScrollVertically(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (internalCanScrollVertically(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 18
Source File: VerticalViewPager.java    From Overchan-Android with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(VerticalViewPager.class.getName());
    info.setScrollable(canScroll());
    if (canScrollVertically1(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (canScrollVertically1(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}
 
Example 19
Source File: ViewPager.java    From guideshow with MIT License 5 votes vote down vote up
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfoCompat info) {
    super.onInitializeAccessibilityNodeInfo(host, info);
    info.setClassName(ViewPager.class.getName());
    info.setScrollable(canScroll());
    if (canScrollHorizontally(1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD);
    }
    if (canScrollHorizontally(-1)) {
        info.addAction(AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD);
    }
}