title: Call requires API level 14 (current min is 8): android.view.ViewGroup#canScrollHorizontally
body: <p>I am getting this error: </p>
  
  <blockquote>
    <p>Call requires API level 14 (current min is 8):
    android.view.ViewGroup#canScrollHorizontally.</p>
  </blockquote>
  
  <p>How I can resolve this in API level before 14?</p>
  
  <pre><code>public class ViewPagerEx extends ViewGroup{
      @Override
      public boolean performAccessibilityAction(View host, int action, Bundle args) {
          if (super.performAccessibilityAction(host, action, args)) {
              return true;
          }
          switch (action) {
              case AccessibilityNodeInfoCompat.ACTION_SCROLL_FORWARD: {
                  if (canScrollHorizontally(1)) {
                      setCurrentItem(mCurItem + 1);
                      return true;
                  }
              } return false;
              case AccessibilityNodeInfoCompat.ACTION_SCROLL_BACKWARD: {
                  if (canScrollHorizontally(-1)) {
                      setCurrentItem(mCurItem - 1);
                      return true;
                  }
              } return false;
          }
          return false;
      }
  
      public boolean canScrollHorizontally(int direction) {
          if (mAdapter == null) {
              return false;
          }
          final int width = getClientWidth();
          final int scrollX = getScrollX();
          if (direction &lt; 0) {
              return (scrollX &gt; (int) (width * mFirstOffset));
          } else if (direction &gt; 0) {
              return (scrollX &lt; (int) (width * mLastOffset));
          } else {
              return false;
          }
      }
  }
  </code></pre>