johannilsson/android-pulltorefresh
소개
지원 중단됨. Android용으로 재사용할 수 있는 당겨서 새로고침 위젯을 제공하는 것을 목표로 하는 프로젝트입니다.
기타 프로젝트측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- -1
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPull To Refresh for Android
Note This library is deprecated, a swipe refresh layout is available in the v4 support library.
This project aims to provide a reusable pull to refresh widget for Android.

Repository at https://github.com/johannilsson/android-pulltorefresh.
Usage
Layout
<!--
The PullToRefreshListView replaces a standard ListView widget.
-->
<com.markupartist.android.widget.PullToRefreshListView
android:id="@+id/android:list"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
/>
Activity
// Set a listener to be invoked when the list should be refreshed.
((PullToRefreshListView) getListView()).setOnRefreshListener(new OnRefreshListener() {
@Override
public void onRefresh() {
// Do work to refresh the list here.
new GetDataTask().execute();
}
});
private class GetDataTask extends AsyncTask<Void, Void, String[]> {
...
@Override
protected void onPostExecute(String[] result) {
mListItems.addFirst("Added after refresh...");
// Call onRefreshComplete when the list has been refreshed.
((PullToRefreshListView) getListView()).onRefreshComplete();
super.onPostExecute(result);
}
}
Last Updated
It's possible to add a last updated time using the method setLastUpdated
and onRefreshComplete. The text provided to these methods will be set below
the Release to refresh text. Note that the time representation is not validated
replaces the previous text, which means that it's possible and recommended to
add a text similar to "Last Update: 15:23". This might be changed in future
versions.
1.5 Support
To use the widget on 1.5 the necessary drawables needs to be copied to that projects drawable folder. The drawables needed by the widget can be found in the drawable-hdpi folder in the library project.
Contributors
- Jason Knight - https://github.com/synthable
- Eddie Ringle - https://github.com/eddieringle
- Christof Dorner - https://github.com/chdorner
- Olof Brickarp - https://github.com/coolof
- James Smith - https://github.com/loopj
- Alex Volovoy - https://github.com/avolovoy
- Bo Maryniuk
- kidfolk
- Tim Mahoney
- Richard Guest
Are you using this widget?
If you are using this widget please feel free to add your app to the wiki.
License
Copyright (c) 2011 Johan Nilsson
Licensed under the Apache License, Version 2.0
관련 프로젝트 살펴보기
불러오는 중…