Created
May 26, 2013 10:29
-
-
Save icastell/5652372 to your computer and use it in GitHub Desktop.
Pushing the ActionBar to the next level
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private boolean mIsOverScrollEnabled = true; | |
public void setOverScrollEnabled(boolean enabled) { | |
mIsOverScrollEnabled = enabled; | |
} | |
public boolean isOverScrollEnabled() { | |
return mIsOverScrollEnabled; | |
} | |
@Override | |
protected boolean overScrollBy(int deltaX, int deltaY, int scrollX, int scrollY, int scrollRangeX, int scrollRangeY, | |
int maxOverScrollX, int maxOverScrollY, boolean isTouchEvent) { | |
return super.overScrollBy( | |
deltaX, | |
deltaY, | |
scrollX, | |
scrollY, | |
scrollRangeX, | |
scrollRangeY, | |
mIsOverScrollEnabled ? maxOverScrollX : 0, | |
mIsOverScrollEnabled ? maxOverScrollY : 0, | |
isTouchEvent); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment