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