mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
コメントの追加とコードの修正
This commit is contained in:
parent
e7b2519de0
commit
c668c188e0
|
@ -29,7 +29,7 @@ public class DocumentAdapter extends RecyclerView.Adapter<DocumentAdapter.Docume
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public DocumentViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
public DocumentViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
|
||||||
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_library_menu, parent, false);
|
View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_item_library_menu, parent, false);// 適切な id に変更する
|
||||||
return new DocumentViewHolder(view);
|
return new DocumentViewHolder(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,8 @@ public class DocumentAdapter extends RecyclerView.Adapter<DocumentAdapter.Docume
|
||||||
ListItem documentMeta = documentMetas.get(position);
|
ListItem documentMeta = documentMetas.get(position);
|
||||||
if (documentMeta != null) {
|
if (documentMeta != null) {
|
||||||
holder.title.setText(documentMeta.getTitle());
|
holder.title.setText(documentMeta.getTitle());
|
||||||
|
}else{
|
||||||
|
holder.title.setText("データがありません");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user