use of com.shizhefei.test.view.adapters.MovieDetailAdapter in project MVCHelper by LuckyJayce.
the class MovieDetailActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ultrarecyclerview);
PtrClassicFrameLayout contentLayout = (PtrClassicFrameLayout) findViewById(R.id.rotate_header_list_view_frame);
RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recyclerView);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
mvcHelper = new MVCUltraHelper<Data3<Movie, List<Discuss>, List<Movie>>>(contentLayout);
// 设置数据源
mvcHelper.setDataSource(new MovieDetailDataSource());
// 设置适配器
mvcHelper.setAdapter(new MovieDetailAdapter(this));
// 加载数据
mvcHelper.refresh();
}
Aggregations