Skip to content

Commit

Permalink
优化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
li-xiaojun committed May 4, 2017
1 parent ba6cfa2 commit 51e7631
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion xrefreshlayout/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import android.support.annotation.Px;
import android.support.v4.view.NestedScrollingParent;
import android.support.v4.view.ViewCompat;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
Expand Down Expand Up @@ -118,14 +117,6 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
return super.dispatchTouchEvent(ev) ;
}

@Override
public boolean onTouchEvent(MotionEvent event) {
if(event.getAction()==MotionEvent.ACTION_UP){
L.d("action up -------------------->");
}
return super.onTouchEvent(event);
}

@Override
public void onNestedScrollAccepted(View child, View target, int axes) {
isRelease = false;
Expand Down Expand Up @@ -325,13 +316,6 @@ public void setLoadingLayout(ILoadingLayout loadingLayout) {
* complete the refresh state!
*/
public void completeRefresh() {
if (isPullFooter && refreshView instanceof RecyclerView) {
RecyclerView recyclerView = (RecyclerView) refreshView;
if (recyclerView.getAdapter() != null) {
recyclerView.smoothScrollToPosition(recyclerView.getAdapter().getItemCount());
}
}

isNeedInitLoadingLayout = true;
smoothScroll(0 - getScrollY());

Expand Down

0 comments on commit 51e7631

Please sign in to comment.