use of in.srain.cube.views.ptr.PtrClassicFrameLayout in project MVCHelper by LuckyJayce.
the class BookDetailActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_bookdetail);
nameTextView = (TextView) findViewById(R.id.name_textView);
authorTextView = (TextView) findViewById(R.id.author_textView);
descriptionTextView = (TextView) findViewById(R.id.description_textView);
contentTextView = (TextView) findViewById(R.id.content_textView);
PtrClassicFrameLayout contentLayout = (PtrClassicFrameLayout) findViewById(R.id.rotate_header_list_view_frame);
mvcHelper = new MVCUltraHelper<Book>(contentLayout);
// 设置数据源
mvcHelper.setDataSource(new BookDetailDataSource());
// 设置适配器
mvcHelper.setAdapter(dataAdapter);
// 加载数据
mvcHelper.refresh();
}
use of in.srain.cube.views.ptr.PtrClassicFrameLayout 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