Is it possible ?? as a Title said
swipe down to refresh Layout but stick the Layout not move it down along swipe gusture
Thank you - I\'m us
After my trial and error, I found one solution from
http://www.dailydevbook.de/android-swiperefreshlayout-without-overscroll/
For people who can implement SwipeRefreshLayout, in order to achieve it
STEP 1: DOWNLOAD android-support v4 (Open Source) from github
STEP 2: COPY following java class to your project src
note1- (Refactor SwipeRefreshLayout to mySwipeRefreshLayout to prevent confusing with original) note2- (Fix these classes and use the source from each other instead of v4)
STEP 3: UPDATE CODE use
STEP 4: UPDATE LAYOUT use
STEP 5: In your mySwipeRefreshLayout.java, find and change to a following code
private void updateContentOffsetTop ( int targetTop) {
final int currentTop = mTarget.getTop ();
if (targetTop> mDistanceToTriggerSync) {
targetTop = ( int ) mDistanceToTriggerSync;
} else if (targetTop < 0 ) {
targetTop = 0 ;
}
// SetTargetOffsetTopAndBottom (targetTop - currentTop);
setTargetOffsetTopAndBottom ( 0 ); // MOD: Prevent Scroll Down Animation
}