From bc74ee605ed43b991661b5201a2386f97d161425 Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 14 Jan 2024 17:25:19 +0900 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AB=E3=81=AA=E3=81=A3?= =?UTF-8?q?=E3=81=9F=E3=83=87=E3=83=90=E3=83=83=E3=82=B0=E3=83=A1=E3=83=8B?= =?UTF-8?q?=E3=83=A5=E3=83=BC=E3=81=AE=E7=94=BB=E9=9D=A2=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DebugMenuDocumentTesterListFragment.java | 81 ------------------- ...DebugMenuDocumentTesterManageFragment.java | 72 ----------------- .../DebugMenuDocumentTesterTopFragment.java | 4 +- ...agment_debug_menu_document_tester_list.xml | 17 ---- ...ment_debug_menu_document_tester_manage.xml | 60 -------------- .../feature_debug_internal_navigation.xml | 16 ---- 6 files changed, 2 insertions(+), 248 deletions(-) delete mode 100644 feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterListFragment.java delete mode 100644 feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterManageFragment.java delete mode 100644 feature/debug/src/main/res/layout/fragment_debug_menu_document_tester_list.xml delete mode 100644 feature/debug/src/main/res/layout/fragment_debug_menu_document_tester_manage.xml diff --git a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterListFragment.java b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterListFragment.java deleted file mode 100644 index a0d57399..00000000 --- a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterListFragment.java +++ /dev/null @@ -1,81 +0,0 @@ -package one.nem.lacerta.feature.debug; - -import android.os.Bundle; - -import androidx.fragment.app.Fragment; -import androidx.recyclerview.widget.RecyclerView; - -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - -import java.text.SimpleDateFormat; -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.feature.debug.common.adapter.DebugMenuDocumentListItemAdapter; -import one.nem.lacerta.feature.debug.common.model.DebugMenuDocumentListItem; -import one.nem.lacerta.model.document.DocumentMeta; -import one.nem.lacerta.utils.LacertaLogger; - -/** - * A simple {@link Fragment} subclass. - * Use the {@link DebugMenuDocumentTesterListFragment#newInstance} factory method to - * create an instance of this fragment. - */ - -@AndroidEntryPoint -public class DebugMenuDocumentTesterListFragment extends Fragment { - - @Inject - Document document; - - @Inject - LacertaLogger logger; - - public DebugMenuDocumentTesterListFragment() { - // Required empty public constructor - } - - public static DebugMenuDocumentTesterListFragment newInstance() { - DebugMenuDocumentTesterListFragment fragment = new DebugMenuDocumentTesterListFragment(); - Bundle args = new Bundle(); - fragment.setArguments(args); - return fragment; - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState) { - // Inflate the layout for this fragment - View view = inflater.inflate(R.layout.fragment_debug_menu_document_tester_list, container, false); - - RecyclerView recyclerView = view.findViewById(R.id.recycler_view_document_list); - recyclerView.setLayoutManager(new androidx.recyclerview.widget.LinearLayoutManager(getContext())); - - ArrayList documentMetas = document.getAllDocumentMetas(100); - - logger.debug("Debug/DocList", "Document count: " + documentMetas.size()); - - List debugMenuDocumentListItems = new ArrayList<>(); - - for (DocumentMeta documentMeta : documentMetas) { - SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - debugMenuDocumentListItems.add(new DebugMenuDocumentListItem(documentMeta.getTitle(), "Internal Id: " + documentMeta.getId(), simpleDateFormat.format(documentMeta.getUpdatedAt()))); - } - - DebugMenuDocumentListItemAdapter adapter = new DebugMenuDocumentListItemAdapter(debugMenuDocumentListItems); - recyclerView.setAdapter(adapter); - - return view; - } -} \ No newline at end of file diff --git a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterManageFragment.java b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterManageFragment.java deleted file mode 100644 index b46ee40d..00000000 --- a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterManageFragment.java +++ /dev/null @@ -1,72 +0,0 @@ -package one.nem.lacerta.feature.debug; - -import android.os.Bundle; - -import androidx.fragment.app.Fragment; - -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; - -import com.google.android.material.textfield.TextInputEditText; - -import java.util.UUID; - -import javax.inject.Inject; - -import dagger.hilt.android.AndroidEntryPoint; -import dagger.multibindings.IntKey; -import one.nem.lacerta.data.DocumentDebug; - -import one.nem.lacerta.model.document.DocumentMeta; -import one.nem.lacerta.model.document.DocumentDetail; - -import one.nem.lacerta.model.document.path.DocumentPath; -import one.nem.lacerta.model.document.tag.DocumentTag; - -/** - * A simple {@link Fragment} subclass. - * Use the {@link DebugMenuDocumentTesterManageFragment#newInstance} factory method to - * create an instance of this fragment. - */ -@AndroidEntryPoint -public class DebugMenuDocumentTesterManageFragment extends Fragment { - - @Inject - DocumentDebug documentDebug; - - public DebugMenuDocumentTesterManageFragment() { - // Required empty public constructor - } - - public static DebugMenuDocumentTesterManageFragment newInstance() { - DebugMenuDocumentTesterManageFragment fragment = new DebugMenuDocumentTesterManageFragment(); - Bundle args = new Bundle(); - fragment.setArguments(args); - return fragment; - } - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - } - - @Override - public View onCreateView(LayoutInflater inflater, ViewGroup container, - Bundle savedInstanceState) { - // Inflate the layout for this fragment - View view = inflater.inflate(R.layout.fragment_debug_menu_document_tester_manage, container, false); - - TextInputEditText editTextDocumentTitle = view.findViewById(R.id.edit_text_document_title); - view.findViewById(R.id.button_insert_test_data).setOnClickListener( v -> { - - DocumentMeta meta = new DocumentMeta(editTextDocumentTitle != null ? editTextDocumentTitle.getText().toString() : "empty title"); // TODO-rca: Nullable - DocumentPath path = new DocumentPath("root", "test_path"); - DocumentDetail detail = new DocumentDetail(meta, path, "test_author", "test_default_branch"); - - documentDebug.insertDocument(meta, detail); - }); - - return view; - } -} \ No newline at end of file diff --git a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterTopFragment.java b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterTopFragment.java index 6d9bbe3e..369b41cc 100644 --- a/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterTopFragment.java +++ b/feature/debug/src/main/java/one/nem/lacerta/feature/debug/DebugMenuDocumentTesterTopFragment.java @@ -47,8 +47,8 @@ public class DebugMenuDocumentTesterTopFragment extends Fragment { List debugMenuDocTesterListItems = new ArrayList<>(); - debugMenuDocTesterListItems.add(new DebugMenuListItem("DocumentListFragment", "DocumentListFragment", R.id.action_debugMenuDocumentTesterTopFragment_to_debugMenuDocumentTesterListFragment, true)); - debugMenuDocTesterListItems.add(new DebugMenuListItem("DocumentManagerFragment", "DocumentManagerFragment", R.id.action_debugMenuDocumentTesterTopFragment_to_debugMenuDocumentTesterManageFragment, true)); +// debugMenuDocTesterListItems.add(new DebugMenuListItem("DocumentListFragment", "DocumentListFragment", R.id.action_debugMenuDocumentTesterTopFragment_to_debugMenuDocumentTesterListFragment, true)); +// debugMenuDocTesterListItems.add(new DebugMenuListItem("DocumentManagerFragment", "DocumentManagerFragment", R.id.action_debugMenuDocumentTesterTopFragment_to_debugMenuDocumentTesterManageFragment, true)); DebugMenuListItemAdapter adapter = new DebugMenuListItemAdapter(debugMenuDocTesterListItems); diff --git a/feature/debug/src/main/res/layout/fragment_debug_menu_document_tester_list.xml b/feature/debug/src/main/res/layout/fragment_debug_menu_document_tester_list.xml deleted file mode 100644 index 65642307..00000000 --- a/feature/debug/src/main/res/layout/fragment_debug_menu_document_tester_list.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - \ No newline at end of file diff --git a/feature/debug/src/main/res/layout/fragment_debug_menu_document_tester_manage.xml b/feature/debug/src/main/res/layout/fragment_debug_menu_document_tester_manage.xml deleted file mode 100644 index e4b8b046..00000000 --- a/feature/debug/src/main/res/layout/fragment_debug_menu_document_tester_manage.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/feature/debug/src/main/res/navigation/feature_debug_internal_navigation.xml b/feature/debug/src/main/res/navigation/feature_debug_internal_navigation.xml index d0f2126d..ebd05b44 100644 --- a/feature/debug/src/main/res/navigation/feature_debug_internal_navigation.xml +++ b/feature/debug/src/main/res/navigation/feature_debug_internal_navigation.xml @@ -28,23 +28,7 @@ android:name="one.nem.lacerta.feature.debug.DebugMenuDocumentTesterTopFragment" android:label="fragment_debug_menu_document_tester_top" tools:layout="@layout/fragment_debug_menu_document_tester_top" > - - - -