use of com.bilirecommendui.main.widget.adapter.RecommendAdapter in project AndroidDevelop by 7449.
the class MainActivity method initCreate.
@Override
protected void initCreate(Bundle savedInstanceState) {
toolbar.setTitle("推荐");
setSupportActionBar(toolbar);
presenter = new RecommendPresenterImpl(this);
adapter = new RecommendAdapter();
recyclerView.setAdapter(adapter);
recyclerView.setHasFixedSize(true);
recyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL));
swipeRefreshLayout.setOnRefreshListener(this);
swipeRefreshLayout.setColorSchemeColors(ContextCompat.getColor(getBaseContext(), R.color.colorPrimary));
swipeRefreshLayout.post(new Runnable() {
@Override
public void run() {
onRefresh();
}
});
}
Aggregations