Search in sources :

Example 1 with CardBookAdapter

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));
}
Also used : CardBookAdapter(com.alphago.alphago.adapter.CardBookAdapter) DbHelper(com.alphago.alphago.database.DbHelper)

Aggregations

CardBookAdapter (com.alphago.alphago.adapter.CardBookAdapter)1 DbHelper (com.alphago.alphago.database.DbHelper)1