use of com.seven.seven.gank.model.GankIoWelfareBean in project seven_develop by seven123456.
the class GankFragment method initRecycler.
private void initRecycler(List<GankIoWelfareBean> data) {
gankAdapter = new GankAdapter(R.layout.recycler_item_gank, data);
recyclerView.setLayoutManager(new GridLayoutManager(getContext(), 2));
recyclerView.setAdapter(gankAdapter);
gankAdapter.setOnItemChildClickListener(new BaseQuickAdapter.OnItemChildClickListener() {
@Override
public void onItemChildClick(BaseQuickAdapter adapter, View view, int position) {
GankIoWelfareBean gankIoWelfareBean = (GankIoWelfareBean) adapter.getItem(position);
Intent intent = new Intent(getContext(), LookImageActivity.class);
intent.putExtra("image", gankIoWelfareBean.getUrl());
startActivity(intent);
}
});
}
Aggregations