From 467d5ae9eeedcfaad6c222fcf3af08f3384c47b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 16 Jan 2024 10:37:36 +0900 Subject: [PATCH] WIP --- .../scanner/ScannerManagerActivity.java | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerManagerActivity.java b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerManagerActivity.java index c681d133..151e1fc7 100644 --- a/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerManagerActivity.java +++ b/component/scanner/src/main/java/one/nem/lacerta/component/scanner/ScannerManagerActivity.java @@ -1,8 +1,11 @@ package one.nem.lacerta.component.scanner; +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; import android.os.Bundle; import android.util.Log; import android.view.View; +import android.widget.LinearLayout; import androidx.activity.EdgeToEdge; import androidx.annotation.AnimatorRes; @@ -13,6 +16,8 @@ import androidx.core.view.WindowInsetsCompat; import com.websitebeaver.documentscanner.DocumentScanner; +import java.util.ArrayList; + import javax.inject.Inject; import dagger.hilt.android.AndroidEntryPoint; @@ -21,15 +26,23 @@ import one.nem.lacerta.utils.LacertaLogger; @AndroidEntryPoint public class ScannerManagerActivity extends AppCompatActivity { + String TAG = "ScannerManagerActivity"; + @Inject LacertaLogger logger; + // Variables + private ArrayList resultImages = new ArrayList<>(); + View view; DocumentScanner documentScanner = new DocumentScanner( this, (croppedImageResults) -> { - // display the first cropped image + for (String result : croppedImageResults) { + this.resultImages.add(BitmapFactory.decodeFile(result)); + } + initResultView(); return null; }, (errorMessage) -> { @@ -67,9 +80,16 @@ public class ScannerManagerActivity extends AppCompatActivity { private void initResultView() { if (this.view == null) { - + logger.debug(TAG, "initResultView: view is null"); return; } + + // Log pt + logger.debug(TAG, "Total images: " + this.resultImages.size()); + + LinearLayout resultContainer = view.findViewById(R.id.result_list_container); + + // ImageButtonを追加する } } \ No newline at end of file