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(); }); }