Lines Matching refs:distance
280 int distance = target - (mHorizontal ? v.getTop() : v.getLeft());
281 long duration = (long) (Math.abs(distance) * 1000 / Math.abs(velocity));
432 protected void onOrthoDrag(View v, float distance) {
434 offsetView(v, distance);
464 private void offsetView(View v, float distance) {
465 v.setAlpha(getAlpha(v, distance));
467 v.setTranslationY(distance);
469 v.setTranslationX(distance);
473 private float getAlpha(View v, float distance) {
474 return 1 - (float) Math.abs(distance) / (mHorizontal ? v.getHeight() : v.getWidth());