Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static final float MAX_SWIPE_DISTANCE_FACTOR = .6f;
- private static final int REFRESH_TRIGGER_DISTANCE = 120;
- private float mTotalDragDistance = -1;
- .................................................................
- if (getParent() != null && ((View) getParent()).getHeight() > 0) {
- final DisplayMetrics metrics = getResources().getDisplayMetrics();
- mTotalDragDistance = (int) Math.min(
- ((View) getParent()).getHeight() * MAX_SWIPE_DISTANCE_FACTOR,
- REFRESH_TRIGGER_DISTANCE * metrics.density);
- }
Add Comment
Please, Sign In to add comment