use of com.shizhefei.test.models.task.InitTokenTask in project MVCHelper by LuckyJayce.
the class PullrefshActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pullrefsh);
PullToRefreshListView refreshListView = (PullToRefreshListView) findViewById(R.id.pullToRefreshListView);
mvcHelper = new MVCPullrefshHelper<>(refreshListView);
// 设置数据源
mvcHelper.setDataSource(DataSources.concatWith(new InitTokenTask(), new BooksDataSource()));
// 设置适配器
mvcHelper.setAdapter(new BooksAdapter(this));
// 加载数据
mvcHelper.refresh();
}
Aggregations