use of com.alphago.alphago.adapter.CardBookAdapter in project Alphago by Onedelay.
the class CardBookListActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_card_book_list);
long categoryId = getIntent().getLongExtra("categoryId", -1);
String category = getIntent().getStringExtra("category");
cat = (TextView) findViewById(R.id.cardbook_list_main_label);
cat.setText(category);
adapter = new CardBookAdapter(this);
recyclerView = (RecyclerView) findViewById(R.id.cardbook_grid);
recyclerView.setAdapter(adapter);
recyclerView.setHasFixedSize(true);
DbHelper dbHelper = new DbHelper(getBaseContext());
adapter.setList(dbHelper.cardbookSelect(categoryId));
}
Aggregations