From c2ee49d274e781da32da1ff45f67c0d7d1515ca6 Mon Sep 17 00:00:00 2001 From: nero Date: Thu, 21 Dec 2023 14:54:58 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E3=81=95=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E3=81=84=E3=82=8B=E3=83=87=E3=83=BC=E3=82=BF=E4=BB=B6=E6=95=B0?= =?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E6=A9=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/deploymentTargetDropDown.xml | 17 ----------------- feature/library/build.gradle | 5 +++++ .../feature/library/LibraryTopFragment.java | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 17 deletions(-) delete mode 100644 .idea/deploymentTargetDropDown.xml diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml deleted file mode 100644 index 76049e85..00000000 --- a/.idea/deploymentTargetDropDown.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/feature/library/build.gradle b/feature/library/build.gradle index 97d6dc86..89087a45 100644 --- a/feature/library/build.gradle +++ b/feature/library/build.gradle @@ -1,5 +1,6 @@ plugins { id 'com.android.library' + id 'com.google.dagger.hilt.android' } android { @@ -46,5 +47,9 @@ dependencies { implementation project(':shared:ui') + implementation project(':model') + + implementation project(':data') + } \ No newline at end of file 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 867f928b..152b73b9 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 @@ -13,17 +13,29 @@ import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; +import android.widget.Toast; import java.util.ArrayList; import java.util.List; +import javax.inject.Inject; + +import dagger.hilt.android.AndroidEntryPoint; +import one.nem.lacerta.data.Document; +import one.nem.lacerta.model.document.DocumentMeta; +import one.nem.lacerta.model.document.tag.DocumentTag; + /** * A simple {@link Fragment} subclass. * Use the {@link LibraryTopFragment#newInstance} factory method to * create an instance of this fragment. */ +@AndroidEntryPoint public class LibraryTopFragment extends Fragment { + @Inject + Document document; + // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; @@ -76,6 +88,13 @@ public class LibraryTopFragment extends Fragment { LinearLayoutManager layoutManager = new LinearLayoutManager(getContext()); documentRecyclerView.setLayoutManager(layoutManager); + List 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");