demo
所属分类:android开发
开发工具:Java
文件大小:142KB
下载次数:26
上传日期:2012-11-22 15:31:17
上 传 者:
453216609
说明: android listView下拉刷新DEMO
(android listView drop-down refresh DEMO)
文件列表:
下拉刷新列表动画(源码) (0, 2011-12-09)
下拉刷新列表动画(源码)\android-pull-to-refresh.png (118050, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefresh (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\AndroidManifest.xml (811, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefreshexample\default.properties (411, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefreshexample\res (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\res\drawable (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\res\drawable-hdpi (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\res\drawable-hdpi\icon.png (1220, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefreshexample\res\drawable-ldpi (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\res\drawable-ldpi\icon.png (902, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefreshexample\res\drawable-mdpi (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\res\drawable-mdpi\icon.png (1048, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefreshexample\res\drawable\icon.png (4147, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefreshexample\res\layout (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\res\layout\pull_to_refresh.xml (528, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefreshexample\res\values (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\res\values\strings.xml (192, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefreshexample\src (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\src\com (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\src\com\markupartist (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\src\com\markupartist\android (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\src\com\markupartist\android\example (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\src\com\markupartist\android\example\pulltorefresh (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefreshexample\src\com\markupartist\android\example\pulltorefresh\PullToRefreshActivity.java (2327, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefresh\AndroidManifest.xml (315, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefresh\default.properties (386, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefresh\res (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefresh\res\drawable (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefresh\res\drawable-hdpi (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefresh\res\drawable-hdpi\ic_pulltorefresh_arrow.png (463, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefresh\res\drawable-ldpi (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefresh\res\drawable-ldpi\ic_pulltorefresh_arrow.png (281, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefresh\res\drawable-mdpi (0, 2011-12-09)
下拉刷新列表动画(源码)\pulltorefresh\res\drawable-mdpi\ic_pulltorefresh_arrow.png (400, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefresh\res\drawable\icon.png (4147, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefresh\res\drawable\pull_to_refresh_header_background.xml (900, 2011-10-11)
下拉刷新列表动画(源码)\pulltorefresh\res\layout (0, 2011-12-09)
... ...
# Pull To Refresh for Android
This project aims to provide a reusable pull to refresh widget for Android.
![Screenshot](https://github.com/johannilsson/android-pulltorefresh/raw/master/android-pull-to-refresh.png)
Repository at .
## Usage
### Layout
``` xml
```
### Activity
``` java
// 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 {
...
@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](http://www.synthable.com/) -
* [Eddie Ringle](http://eddieringle.com/) -
* [Christof Dorner](http://chdorner.com) -
* [Olof Brickarp](http://www.yay.se) -
* [James Smith](http://loopj.com/) -
* [Alex Volovoy](http://bytesharp.com/) -
* Bo Maryniuk
* [kidfolk](https://github.com/kidfolk)
* [Tim Mahoney](https://github.com/timahoney)
## Are you using this widget?
If you are using this widget please feel free to add your app to the
[wiki](https://github.com/johannilsson/android-pulltorefresh/wiki/Apps).
## License
Copyright (c) 2011 [Johan Nilsson](http://markupartist.com)
Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)
近期下载者:
相关文件:
收藏者: