@Override protected boolean canScroll(final View v, final boolean checkV, final int dx, final int x, final int y) { return super.canScroll(v, checkV, dx, x, y); } }
@Override protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) { if (v instanceof SurfaceView || v instanceof PagerTabStrip) { return(true); } return(super.canScroll(v, checkV, dx, x, y)); } }
protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) { return super.canScroll(v, checkV, dx, x, y) || (checkV && customCanScroll(v)); }
@Override protected boolean canScroll(final View v, final boolean checkV, final int dx, final int x, final int y) { if (v instanceof MapView) { Log.i(TAG, "Scrolling disabled for map view"); return true; } return super.canScroll(v, checkV, dx, x, y); } }
@Override protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) { if (v instanceof PhotoImageView) { return ((PhotoImageView) v).canScrollHorizontallyFroyo(-dx); } else { return super.canScroll(v, checkV, dx, x, y); } } }
@Override protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) { if (v instanceof TouchImageView) { return ((TouchImageView) v).canScrollHorizontallyFroyo(-dx); } else { return super.canScroll(v, checkV, dx, x, y); } }
@Override protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) { if (v instanceof TouchImageView) { // // canScrollHorizontally is not supported for Api < 14. To get around this issue, // ViewPager is extended and canScrollHorizontallyFroyo, a wrapper around // canScrollHorizontally supporting Api >= 8, is called. // return ((TouchImageView) v).canScrollHorizontallyFroyo(-dx); } else { return super.canScroll(v, checkV, dx, x, y); } }
if (x + scrollX >= child.getLeft() && x + scrollX < child.getRight() && y + scrollY >= child.getTop() && y + scrollY < child.getBottom() && canScroll(child, true, dx, x + scrollX - child.getLeft(), y + scrollY - child.getTop())) { return true;
if (x + scrollX >= child.getLeft() && x + scrollX < child.getRight() && y + scrollY >= child.getTop() && y + scrollY < child.getBottom() && canScroll(child, true, dx, x + scrollX - child.getLeft(), y + scrollY - child.getTop())) { return true;
@Override protected boolean canScroll(View v, boolean checkV, int dx, int x, int y) { if(v instanceof ImageView) { ImageView iv = (ImageView) v; Drawable drawable = iv.getDrawable(); if(drawable != null) { float vw = iv.getWidth(); float vh = iv.getHeight(); float dw = drawable.getIntrinsicWidth(); float dh = drawable.getIntrinsicHeight(); Matrix matrix = iv.getImageMatrix(); matrix.getValues(VALUES); float tx = VALUES[Matrix.MTRANS_X] + dx; float sdw = dw * VALUES[Matrix.MSCALE_X]; //Log.d(TAG, "sdw: " + sdw + " vw: " + vw); return VALUES[Matrix.MSCALE_X] / centerInsideScale(vw, vh, dw, dh) > scaleThreshold && !translationExceedsBoundary(tx, vw, sdw) && sdw > vw && pointerCount == 1; // Assumes x-y scales are equal } } return super.canScroll(v, checkV, dx, x, y); }
if (DEBUG) Log.v(TAG, "Moved x to " + x + "," + y + " diff=" + xDiff + "," + yDiff); if (canScroll(this, false, (int) dx, (int) x, (int) y)) {
canScroll(this, false, (int) dx, (int) x, (int) y)) {