From 017748b4a631745cc534d10b7b9a8d64a158966d Mon Sep 17 00:00:00 2001 From: nero Date: Thu, 21 Dec 2023 16:03:49 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E3=81=95=E3=82=8C=E3=81=9F?= =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=82=92=E4=B8=80=E8=A6=A7=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/feature/library/DocumentAdapter.java | 15 +++++++++------ .../feature/library/LibraryTopFragment.java | 13 +++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/feature/library/src/main/java/one/nem/lacerta/feature/library/DocumentAdapter.java b/feature/library/src/main/java/one/nem/lacerta/feature/library/DocumentAdapter.java index 12b4fdef..ae187769 100644 --- a/feature/library/src/main/java/one/nem/lacerta/feature/library/DocumentAdapter.java +++ b/feature/library/src/main/java/one/nem/lacerta/feature/library/DocumentAdapter.java @@ -10,12 +10,14 @@ import androidx.recyclerview.widget.RecyclerView; import java.util.List; +import one.nem.lacerta.model.document.DocumentMeta; + public class DocumentAdapter extends RecyclerView.Adapter { - private List documentList; + private List documentMetas; - public DocumentAdapter(List documentList) { - this.documentList = documentList; + public DocumentAdapter(List documentMetas) { + this.documentMetas = documentMetas; } @NonNull @@ -27,12 +29,13 @@ public class DocumentAdapter extends RecyclerView.Adapter metas = new ArrayList<>(); metas = document.getAllDocumentMetas(100); Toast.makeText(getContext(), "Documents: " + Integer.toString(metas.size()), Toast.LENGTH_LONG).show(); - - List documentList = new ArrayList<>(); - documentList.add("Document A"); - documentList.add("Document B"); - documentList.add("Document C"); + //仮データを取得 +// List documentList = new ArrayList<>(); +// documentList.add("Document A"); +// documentList.add("Document B"); +// documentList.add("Document C"); // Create and set the adapter - DocumentAdapter adapter = new DocumentAdapter(documentList); + DocumentAdapter adapter = new DocumentAdapter(metas); documentRecyclerView.setAdapter(adapter); // Use a LinearLayoutManager to specify the layout