Skip to content

Commit 641a073

Browse files
committed
fix some bug
1 parent a1b8141 commit 641a073

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ android {
2323
}
2424

2525
dependencies {
26-
// compile project(':library')
27-
compile 'com.cjj.materialrefeshlayout:library:1.3.0'
26+
compile project(':library')
27+
// compile 'com.cjj.materialrefeshlayout:library:1.3.0'
2828
compile 'com.android.support:recyclerview-v7:22.2.1'
2929
compile 'com.android.support:cardview-v7:22.2.1'
3030
}

app/src/main/java/com/cjj/android_materialrefreshlayout/RecyclerViewActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void run() {
7171
materialRefreshLayout
7272
.autoRefreshLoadMore();
7373
}
74-
}, 3000);
74+
}, 1000);
7575
RecyclerView rv = (RecyclerView) findViewById(R.id.recyclerview);
7676
setupRecyclerView(rv);
7777
}

library/src/main/java/com/cjj/MaterialRefreshLayout.java

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -316,16 +316,19 @@ public boolean onTouchEvent(MotionEvent e) {
316316

317317
public void autoRefresh()
318318
{
319-
updateListener();
320-
if(isOverlay)
319+
if(!isRefreshing)
321320
{
322-
323-
mHeadLayout.getLayoutParams().height = (int) mHeadHeight;
324-
mHeadLayout.requestLayout();
325-
}else
326-
{
327-
createAnimatorTranslationY(mChildView, mHeadHeight, mHeadLayout);
321+
updateListener();
322+
if(isOverlay)
323+
{
324+
mHeadLayout.getLayoutParams().height = (int) mHeadHeight;
325+
mHeadLayout.requestLayout();
326+
}else
327+
{
328+
createAnimatorTranslationY(mChildView, mHeadHeight, mHeadLayout);
329+
}
328330
}
331+
329332
}
330333

331334
public void autoRefreshLoadMore()

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ':app', ':library', ':blogcodes'
1+
include ':app', ':library'

0 commit comments

Comments
 (0)