diff --git a/SuperSwipeRefreshLayout-Demo-AS/lib/src/main/java/com/github/nuptboyzhb/lib/SuperSwipeRefreshLayout.java b/SuperSwipeRefreshLayout-Demo-AS/lib/src/main/java/com/github/nuptboyzhb/lib/SuperSwipeRefreshLayout.java index 7c82577..b3ea4d4 100755 --- a/SuperSwipeRefreshLayout-Demo-AS/lib/src/main/java/com/github/nuptboyzhb/lib/SuperSwipeRefreshLayout.java +++ b/SuperSwipeRefreshLayout-Demo-AS/lib/src/main/java/com/github/nuptboyzhb/lib/SuperSwipeRefreshLayout.java @@ -37,6 +37,8 @@ import android.widget.RelativeLayout; import android.widget.ScrollView; +import static android.os.Build.VERSION_CODES.KITKAT; + /** * @Author Zheng Haibo * @PersonalWebsite http://www.mobctrl.net @@ -1125,7 +1127,9 @@ private void setTargetOffsetTopAndBottom(int offset, boolean requiresUpdate) { mHeadViewContainer.bringToFront(); mHeadViewContainer.offsetTopAndBottom(offset); mCurrentTargetOffsetTop = mHeadViewContainer.getTop(); - if (requiresUpdate && Build.VERSION.SDK_INT < 11) { + //针对4.4及之前版本的兼容 + if (requiresUpdate && Build.VERSION.SDK_INT < KITKAT) { + requestLayout(); invalidate(); } updateListenerCallBack();