mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
保存されているデータ件数を表示する機能
This commit is contained in:
parent
dd98602309
commit
c2ee49d274
|
@ -1,17 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="deploymentTargetDropDown">
|
|
||||||
<runningDeviceTargetSelectedWithDropDown>
|
|
||||||
<Target>
|
|
||||||
<type value="RUNNING_DEVICE_TARGET" />
|
|
||||||
<deviceKey>
|
|
||||||
<Key>
|
|
||||||
<type value="SERIAL_NUMBER" />
|
|
||||||
<value value="ZY227DCBHN" />
|
|
||||||
</Key>
|
|
||||||
</deviceKey>
|
|
||||||
</Target>
|
|
||||||
</runningDeviceTargetSelectedWithDropDown>
|
|
||||||
<timeTargetWasSelectedWithDropDown value="2023-12-21T04:53:14.729902700Z" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
|
@ -1,5 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.library'
|
id 'com.android.library'
|
||||||
|
id 'com.google.dagger.hilt.android'
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -46,5 +47,9 @@ dependencies {
|
||||||
|
|
||||||
implementation project(':shared:ui')
|
implementation project(':shared:ui')
|
||||||
|
|
||||||
|
implementation project(':model')
|
||||||
|
|
||||||
|
implementation project(':data')
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -13,17 +13,29 @@ import android.view.ViewGroup;
|
||||||
import android.widget.ArrayAdapter;
|
import android.widget.ArrayAdapter;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
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.
|
* A simple {@link Fragment} subclass.
|
||||||
* Use the {@link LibraryTopFragment#newInstance} factory method to
|
* Use the {@link LibraryTopFragment#newInstance} factory method to
|
||||||
* create an instance of this fragment.
|
* create an instance of this fragment.
|
||||||
*/
|
*/
|
||||||
|
@AndroidEntryPoint
|
||||||
public class LibraryTopFragment extends Fragment {
|
public class LibraryTopFragment extends Fragment {
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
Document document;
|
||||||
|
|
||||||
// TODO: Rename parameter arguments, choose names that match
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
private static final String ARG_PARAM1 = "param1";
|
private static final String ARG_PARAM1 = "param1";
|
||||||
|
@ -76,6 +88,13 @@ public class LibraryTopFragment extends Fragment {
|
||||||
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
|
LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
|
||||||
documentRecyclerView.setLayoutManager(layoutManager);
|
documentRecyclerView.setLayoutManager(layoutManager);
|
||||||
|
|
||||||
|
List<DocumentMeta> metas = new ArrayList<>();
|
||||||
|
|
||||||
|
metas = document.getAllDocumentMetas(100);
|
||||||
|
|
||||||
|
Toast.makeText(getContext(), "Documents: " + Integer.toString(metas.size()), Toast.LENGTH_LONG).show();
|
||||||
|
|
||||||
|
|
||||||
List<String> documentList = new ArrayList<>();
|
List<String> documentList = new ArrayList<>();
|
||||||
documentList.add("Document A");
|
documentList.add("Document A");
|
||||||
documentList.add("Document B");
|
documentList.add("Document B");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user