From 49a7e9677c3adc6314a50b90f603a967b781c95f Mon Sep 17 00:00:00 2001 From: nero Date: Thu, 11 Jan 2024 14:25:19 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/feature/library/LibraryTopFragment.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 4c555da0..39886d6a 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 @@ -82,18 +82,21 @@ public class LibraryTopFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + // レイアウトファイル(fragment_library_top.xml)をインフレートしてビューを作成 // Inflate the layout for this fragment View view = inflater.inflate(R.layout.fragment_library_top, container, false); + // レイアウトファイル内のRecyclerView要素を取得 // Use view.findViewById instead of findViewById RecyclerView documentRecyclerView = view.findViewById(R.id.document_list); LinearLayoutManager layoutManager = new LinearLayoutManager(getContext()); documentRecyclerView.setLayoutManager(layoutManager); - //データを取得 + // ドキュメントのメタデータを取得 List metas = document.getAllDocumentMetas(100); + // ドキュメントをデフォルトフォルダに追加 // フォルダごとにドキュメントを管理する for (DocumentMeta meta : metas) { folderManager.addDocumentToFolder("Default Folder", meta); @@ -102,6 +105,7 @@ public class LibraryTopFragment extends Fragment { // 特定のフォルダのドキュメントを取得 List folderDocuments = folderManager.getDocumentsInFolder("Default Folder"); + // トーストメッセージでドキュメントの数を表示 Toast.makeText(getContext(), "Documents: " + Integer.toString(metas.size()), Toast.LENGTH_LONG).show(); // Create and set the adapter