Search in sources :

Example 1 with CollectionAdapter

use of com.alphago.alphago.adapter.CollectionAdapter in project Alphago by Onedelay.

the class CollectionListActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_collection_list);
    dbHelper = new DbHelper(getBaseContext());
    adapter = new CollectionAdapter(this);
    recyclerView = (RecyclerView) findViewById(R.id.collection_list);
    recyclerView.setAdapter(adapter);
    recyclerView.setHasFixedSize(true);
    long catId = getIntent().getLongExtra("categoryId", 0);
    adapter.setList(dbHelper.collectionSelect(catId));
}
Also used : CollectionAdapter(com.alphago.alphago.adapter.CollectionAdapter) DbHelper(com.alphago.alphago.database.DbHelper)

Aggregations

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