Improve gallery list refresh

This commit is contained in:
seven332 committed 2015-05-10 16:12:48 +08:00
1 parent fc03b967b3
commit 0222dcd727
2 files changed
+17 -1

No files matched your search

@@ -405,6 +405,22 @@ public class ContentLayout extends FrameLayout {
doRefresh();
}
public void refreshWithSameSearch() {
if (mViewTransition.getShownViewIndex() == 0) {
// Go to top
mRecyclerView.stopScroll();
mLayoutManager.smoothScrollToPosition(mRecyclerView, null, 0);
// Show header refresh
mRefreshLayout.setFooterRefreshing(false);
mRefreshLayout.setHeaderRefreshing(true);
// Do refresh
doRefresh();
} else {
showProgressBar();
doRefresh();
}
}
/**
* Only work when data is loaded
*/