try the following instead
//member declaration
private ArrayList<Book> books;
public BookRecViewAdapter(Context mcontexet , String parent) {
this.mcontexet = mcontexet;
this.parent = parent;
this.books = new ArrayList<>();
}
@Override
public int getItemCount() {
return this.books.size()
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…