Android 下拉刷新

时间:2020-02-02 08:32:17
【文件属性】:

文件名称:Android 下拉刷新

文件大小:2.58MB

文件格式:RAR

更新时间:2020-02-02 08:32:17

Android 下拉刷新

使用 @Override public void onRefresh() { // TODO Auto-generated method stub new Handler().postDelayed(new Runnable() { public void run() { // infoList.clear(); swipeLayout.setRefreshing(false); ItemInfo info = new ItemInfo(); for (int i = 0; i < 1; i++) { info.setName("refresh_success"); infoList.add(info); } adapter.notifyDataSetChanged(); } }, 1000); } @Override public void onScrollStateChanged(AbsListView view, int scrollState) { // TODO Auto-generated method stub if (scrollState == OnScrollListener.SCROLL_STATE_IDLE && isLastItemPosition ==adapter.getCount()) { if (!swipeLayout.isRefreshing()&&isSecondPage) { isUp = true; isSecondPage = false; getData(); } } } @Override public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) { // TODO Auto-generated method stub isLastItemPosition = firstVisibleItem+visibleItemCount; if (totalItemCount > visibleItemCount) { // 第二页 isSecondPage = true; } }


【文件预览】:
ShuaTest
----.project(844B)
----bin()
--------AndroidManifest.xml(854B)
--------jarlist.cache(120B)
--------ShuaTest.apk(497KB)
--------dexedLibs()
--------res()
--------resources.ap_(46KB)
--------classes()
--------classes.dex(1.33MB)
----.settings()
--------org.eclipse.core.resources.prefs(57B)
--------org.eclipse.jdt.core.prefs(177B)
----ic_launcher-web.png(50KB)
----AndroidManifest.xml(854B)
----proguard-project.txt(781B)
----libs()
--------android-support-v4.jar(1.3MB)
----src()
--------com()
----project.properties(563B)
----res()
--------values()
--------layout()
--------drawable-ldpi()
--------drawable-hdpi()
--------values-v11()
--------drawable-mdpi()
--------drawable-xhdpi()
--------drawable-xxhdpi()
--------menu()
--------values-w820dp()
--------values-v14()
----.classpath(541B)
----gen()
--------com()
----assets()

网友评论