From e70f9309295cfb23b193e7ff94ccd77459735163 Mon Sep 17 00:00:00 2001 From: nero Date: Tue, 19 Dec 2023 12:00:56 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=BC=E3=83=89=E3=82=92=E5=BE=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feature/library/LibraryTopFragment.java | 28 ++++++++----------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java b/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java index 081605a7..1af45258 100644 --- a/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java +++ b/feature/library/src/main/java/one/nem/lacerta/feature/library/LibraryTopFragment.java @@ -102,7 +102,6 @@ public class LibraryTopFragment extends Fragment { textView.setText(document); } } - } @Override @@ -113,23 +112,18 @@ public class LibraryTopFragment extends Fragment { // Use view.findViewById instead of findViewById RecyclerView documentRecyclerView = view.findViewById(R.id.document_list); + List documentList = new ArrayList<>(); + documentList.add("Document A"); + documentList.add("Document B"); + documentList.add("Document C"); - if (documentRecyclerView != null) { - 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); - documentRecyclerView.setAdapter(adapter); - - // Use a LinearLayoutManager to specify the layout - LinearLayoutManager layoutManager = new LinearLayoutManager(requireContext()); - documentRecyclerView.setLayoutManager(layoutManager); - } +// Create and set the adapter + DocumentAdapter adapter = new DocumentAdapter(documentList); + documentRecyclerView.setAdapter(adapter); +// Use a LinearLayoutManager to specify the layout + LinearLayoutManager layoutManager = new LinearLayoutManager(requireContext()); + documentRecyclerView.setLayoutManager(layoutManager); return view; + } } - -} \ No newline at end of file