mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
nullの場合は0を返すように
This commit is contained in:
parent
3130be88be
commit
93b833f7a9
|
@ -21,8 +21,8 @@ public class ListItemAdapter extends RecyclerView.Adapter<ListItemAdapter.ListIt
|
|||
|
||||
DocumentSelectListener listener;
|
||||
|
||||
public ListItemAdapter(DocumentSelectListener listener){
|
||||
this.libraryItemPage = new LibraryItemPage();
|
||||
|
||||
public ListItemAdapter(DocumentSelectListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,8 @@ public class ListItemAdapter extends RecyclerView.Adapter<ListItemAdapter.ListIt
|
|||
|
||||
@Override
|
||||
public int getItemCount() {
|
||||
return libraryItemPage.getListItems().size();
|
||||
return this.libraryItemPage == null ? 0
|
||||
: this.libraryItemPage.getListItems() == null ? 0 : this.libraryItemPage.getListItems().size();
|
||||
}
|
||||
|
||||
public static class ListItemViewHolder extends RecyclerView.ViewHolder{
|
||||
|
|
Loading…
Reference in New Issue
Block a user