public class BinderListView<T> extends Object
SwipRefreshBinderListView(ListView, IFresh)setIList(IList) 设置监听binderFooterView(Page) 添加加载更多,Page.start 起始页 Page.avg 每页加载的数量,Page.stop 默认是-1,Page.cur和Page.total 这2个参数是自动计算的
getFooter()·Footer.update(Page) 来更新footer的状态。| 限定符和类型 | 类和说明 |
|---|---|
class |
BinderListView.BinderAdapter |
| 构造器和说明 |
|---|
BinderListView(android.widget.ListView listView,
IFresh fresh) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addData(int index,
T t) |
void |
addData(List<T> data)
给ListView 增加数据
|
void |
addData(T t) |
BinderListView<T> |
binderFooterView(Page page) |
void |
forcefresh()
强制执行刷新动作
|
BinderListView.BinderAdapter |
getAdapter() |
Footer |
getFooter() |
IList<T> |
getIList() |
void |
loadFail()
下拉刷新,或者 加载更多页时候,请求失败,调用此方法更新ListView的状态
|
void |
notifyDataSetChanged() |
void |
setData(List<T> data)
设置ListView的数据源
|
BinderListView<T> |
setIList(IList<T> ilist) |
BinderListView<T> |
startAuto(boolean auto)
是否自动 触发加载更多
|
void |
updateFinalPage(int page) |
public BinderListView(android.widget.ListView listView,
IFresh fresh)
public BinderListView.BinderAdapter getAdapter()
public void notifyDataSetChanged()
public void addData(T t)
public void addData(int index,
T t)
public BinderListView<T> startAuto(boolean auto)
auto - Footer.startAuto(boolean)public void updateFinalPage(int page)
public Footer getFooter()
public BinderListView<T> binderFooterView(Page page)
page - 包含page的初始信息Pagepublic void loadFail()
public BinderListView<T> setIList(IList<T> ilist)
ilist - 必须设置的监听,包含下拉刷新,加载更多,给ListView绑定Itempublic void forcefresh()