use of com.alphago.alphago.adapter.CategoryAdapter in project Alphago by Onedelay.
the class CardBookActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_card_book);
final Intent intent = new Intent(this, WordLearningActivity.class);
dbHelper = new DbHelper(getBaseContext());
btnLearning = (Button) findViewById(R.id.btn_learning);
btnLearning.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (!isSelectMode) {
new LearningSelectionMethodDialog().show(getSupportFragmentManager(), "dialog");
} else {
intent.putExtra("category_select_list", selectList);
intent.putExtra("learning_type", LearningSelectionMethodDialog.TYPE_ALBUM);
startActivity(intent);
cancelLearning(dbHelper);
}
}
});
adapter = new CategoryAdapter(this);
recyclerView = (RecyclerView) findViewById(R.id.cardbook_grid);
recyclerView.setAdapter(adapter);
recyclerView.setHasFixedSize(true);
// recyclerView.setLayoutManager(new GridLayoutManager(this, 3));
adapter.setList(dbHelper.categorySelect());
}
Aggregations