Codota Logo
YViewPager.canScrollHorizontal
Code IndexAdd Codota to your IDE (free)

How to use
canScrollHorizontal
method
in
cn.youngkaaa.yviewpager.YViewPager

Best Java code snippets using cn.youngkaaa.yviewpager.YViewPager.canScrollHorizontal (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: open-android/ViewPager

/**
 * Tests scrollability within child views of v given a delta of dx.
 *
 * @param v      View to test for horizontal scrollability
 * @param checkV Whether the view v passed should itself be checked for scrollability (true),
 *               or just its children (false).
 * @param dx     Delta scrolled in pixels
 * @param x      X coordinate of the active touch point
 * @param y      Y coordinate of the active touch point
 * @return true if child views of v can be scrolled by delta of dx.
 */
protected boolean canScrollHorizontal(View v, boolean checkV, int dx, int x, int y) {
  if (v instanceof ViewGroup) {
    final ViewGroup group = (ViewGroup) v;
    final int scrollX = v.getScrollX();
    final int scrollY = v.getScrollY();
    final int count = group.getChildCount();
    for (int i = count - 1; i >= 0; i--) {
      // TODO: Add versioned support here for transformed views.
      final View child = group.getChildAt(i);
      if (x + scrollX >= child.getLeft() && x + scrollX < child.getRight()
          && y + scrollY >= child.getTop() && y + scrollY < child.getBottom()
          && canScrollHorizontal(child, true, dx, x + scrollX - child.getLeft(),
          y + scrollY - child.getTop())) {
        return true;
      }
    }
  }
  return checkV && ViewCompat.canScrollHorizontally(v, -dx);
}
origin: open-android/ViewPager

&& canScrollHorizontal(this, false, (int) dx, (int) x, (int) y)) {
cn.youngkaaa.yviewpagerYViewPagercanScrollHorizontal

Javadoc

Tests scrollability within child views of v given a delta of dx.

Popular methods of YViewPager

  • getCurrentItem
  • setCurrentItem
    Set the currently selected page.
  • addNewItem
  • addOnPageChangeListener
  • addViewInLayout
  • arrowScroll
    Handle scrolling in response to a left or right arrow click.
  • calculatePageOffsetsHorizontal
  • calculatePageOffsetsVertical
  • canScrollHorizontally
    Check if this ViewPager can be scrolled horizontally in a certain direction.
  • canScrollVertical
    Tests scrollability within child views of v given a delta of dx.
  • checkLayoutParams
  • completeScrollHorizontal
  • checkLayoutParams,
  • completeScrollHorizontal,
  • completeScrollVertical,
  • dataSetChanged,
  • determineTargetPageHorizontal,
  • determineTargetPageVertical,
  • dispatchOnPageScrolled,
  • dispatchOnPageSelected,
  • dispatchOnScrollStateChanged

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now