From 07042f4e91421262d5e1fcfa8fcc73da902c04e8 Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 7 Jan 2024 17:52:56 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=AA=E3=82=B9=E3=83=8A=E3=83=BC=E4=BD=9C?= =?UTF-8?q?=E6=88=90=20=E3=81=84=E3=82=8D=E3=81=84=E3=82=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scanner/ScannerDataManagerStubFragment.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java index 25798081..4fc8a0c0 100644 --- a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java +++ b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerDataManagerStubFragment.java @@ -29,7 +29,10 @@ import java.util.ArrayList; import java.util.Date; import java.util.Locale; +import javax.inject.Inject; + import one.nem.lacerta.processor.DocumentProcessor; +import one.nem.lacerta.processor.factory.DocumentProcessorFactory; /** * A simple {@link Fragment} subclass. @@ -45,6 +48,9 @@ public class ScannerDataManagerStubFragment extends Fragment { private Uri photoURI; + @Inject + DocumentProcessorFactory documentProcessorFactory; + private final ActivityResultLauncher cameraLauncher = registerForActivityResult( new ActivityResultContracts.StartActivityForResult(), result -> { @@ -123,10 +129,17 @@ public class ScannerDataManagerStubFragment extends Fragment { updateResults(); }); + view.findViewById(R.id.button_create_documnent).setOnClickListener(v -> { + Log.d("ScannerDataManagerStubFragment", "button_create_documnent clicked"); + Toast.makeText(getActivity(), "button_create_documnent clicked", Toast.LENGTH_LONG).show(); + // TODO-rca: ここでDocumentを作成する + }); + view.findViewById(R.id.button_init_document_processor).setOnClickListener(v -> { Log.d("ScannerDataManagerStubFragment", "button_init_document_processor clicked"); Toast.makeText(getActivity(), "button_init_document_processor clicked", Toast.LENGTH_LONG).show(); // TODO-rca: ここでDocumentProcessorを初期化する + DocumentProcessor documentProcessor = documentProcessorFactory.create(); }); }