Added Android code
[wl-app.git] / Android / app / src / main / java / com / moiseum / wolnelektury / view / library / LibraryAdapter.java
1 package com.moiseum.wolnelektury.view.library;
2
3 import android.content.Context;
4 import android.view.ViewGroup;
5
6 import com.moiseum.wolnelektury.R;
7 import com.moiseum.wolnelektury.components.recycler.RecyclerAdapter;
8 import com.moiseum.wolnelektury.connection.models.BookModel;
9
10 /**
11  * @author golonkos
12  */
13
14 public class LibraryAdapter extends RecyclerAdapter<BookModel, BookViewHolder> {
15
16         public LibraryAdapter(Context context) {
17                 super(context, Selection.NONE);
18         }
19
20         @Override
21         protected String getItemId(BookModel item) {
22                 return null;
23         }
24
25         @Override
26         public BookViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
27                 return new BookViewHolder(inflate(R.layout.book_item, parent));
28         }
29 }