From 704c12880114b6f858e52f8988f7a7de2404c8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Fri, 19 Jan 2024 18:43:22 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=84=E3=82=8D=E3=81=84=E3=82=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/feature/home/HomeTopFragment.java | 22 +++++++--------- .../src/main/res/layout/fragment_home_top.xml | 26 +++---------------- 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java b/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java index ff6c5ca5..e1d3657f 100644 --- a/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java +++ b/feature/home/src/main/java/one/nem/lacerta/feature/home/HomeTopFragment.java @@ -93,19 +93,17 @@ public class HomeTopFragment extends Fragment { // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_home_top, container, false); -// List metas = document.getAllDocumentMetas(100); + ArrayList recentDocument = lacertaLibrary.getRecentDocument(10); -// ArrayList listItems = lacertaLibrary.getRecentDocument(100); -// -// Log.d("docs", Integer.toString(listItems.size())); -// -// RecyclerView recyclerView = view.findViewById(R.id.item_recycler_view); -// -// recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); -// -// MyAdapter myAdapter = new MyAdapter(listItems); -// -// recyclerView.setAdapter(myAdapter); + Log.d("docs", Integer.toString(recentDocument.size())); + + RecyclerView recyclerView = view.findViewById(R.id.home_item_recycler_view); + + recyclerView.setLayoutManager(new LinearLayoutManager(getContext())); + + ListItemAdapter listItemAdapter = new ListItemAdapter(recentDocument); + + recyclerView.setAdapter(listItemAdapter); return view; diff --git a/feature/home/src/main/res/layout/fragment_home_top.xml b/feature/home/src/main/res/layout/fragment_home_top.xml index fb74430d..cfc2b1f8 100644 --- a/feature/home/src/main/res/layout/fragment_home_top.xml +++ b/feature/home/src/main/res/layout/fragment_home_top.xml @@ -14,7 +14,7 @@ - - - - - - - - - + app:layout_behavior="@string/appbar_scrolling_view_behavior" />