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" />