Skip to content

Commit 51e7631

Browse files
author
li-xiaojun
committed
优化代码
1 parent ba6cfa2 commit 51e7631

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

xrefreshlayout/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ android {
2323
dependencies {
2424
compile fileTree(dir: 'libs', include: ['*.jar'])
2525
compile 'com.android.support:appcompat-v7:25.3.0'
26-
compile 'com.android.support:recyclerview-v7:25.0.0'
2726
}

xrefreshlayout/src/main/java/com/lxj/xrefreshlayout/XRefreshLayout.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import android.support.annotation.Px;
55
import android.support.v4.view.NestedScrollingParent;
66
import android.support.v4.view.ViewCompat;
7-
import android.support.v7.widget.RecyclerView;
87
import android.util.AttributeSet;
98
import android.view.MotionEvent;
109
import android.view.View;
@@ -118,14 +117,6 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
118117
return super.dispatchTouchEvent(ev) ;
119118
}
120119

121-
@Override
122-
public boolean onTouchEvent(MotionEvent event) {
123-
if(event.getAction()==MotionEvent.ACTION_UP){
124-
L.d("action up -------------------->");
125-
}
126-
return super.onTouchEvent(event);
127-
}
128-
129120
@Override
130121
public void onNestedScrollAccepted(View child, View target, int axes) {
131122
isRelease = false;
@@ -325,13 +316,6 @@ public void setLoadingLayout(ILoadingLayout loadingLayout) {
325316
* complete the refresh state!
326317
*/
327318
public void completeRefresh() {
328-
if (isPullFooter && refreshView instanceof RecyclerView) {
329-
RecyclerView recyclerView = (RecyclerView) refreshView;
330-
if (recyclerView.getAdapter() != null) {
331-
recyclerView.smoothScrollToPosition(recyclerView.getAdapter().getItemCount());
332-
}
333-
}
334-
335319
isNeedInitLoadingLayout = true;
336320
smoothScroll(0 - getScrollY());
337321

0 commit comments

Comments
 (0)