From eb6a13bababcbdb99301d2f6ad2f4c155fd59485 Mon Sep 17 00:00:00 2001 From: r-ca Date: Mon, 8 Jan 2024 11:00:55 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=9C=E3=82=BF=E3=83=B3=E8=BF=BD=E5=8A=A0WI?= =?UTF-8?q?P?= 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 fecd127a..0477a6f3 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 @@ -172,6 +172,19 @@ public class ScannerDataManagerStubFragment extends Fragment { this.documentProcessor.init(); Toast.makeText(getActivity(), "documentProcessor initialized", Toast.LENGTH_LONG).show(); }); + + view.findViewById(R.id.button_add_page).setOnClickListener(v -> { + Log.d("ScannerDataManagerStubFragment", "button_add_page clicked"); + Toast.makeText(getActivity(), "button_add_page clicked", Toast.LENGTH_LONG).show(); + if (this.documentProcessor == null) { + Toast.makeText(getActivity(), "documentProcessor is null", Toast.LENGTH_LONG).show(); + return; + } + + for (CapturedData capturedData : this.results) { + this.documentProcessor.addNewPageToLast(capturedData.getBitmap()); + } + }); } public DocumentDetail createSampleDocumentDetail() {