From 24e54ec0f09eef82f5710f041c2d595f7a5fff10 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 11:58:42 +0900 Subject: [PATCH] =?UTF-8?q?=E7=B5=82=E4=BA=86=E3=83=9C=E3=82=BF=E3=83=B3?= =?UTF-8?q?=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/component/scanner/ScannerManagerActivity.java | 5 +++++ 1 file changed, 5 insertions(+) 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 bed03b42..45590cef 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 @@ -21,6 +21,7 @@ import com.google.android.material.appbar.MaterialToolbar; import com.websitebeaver.documentscanner.DocumentScanner; import java.util.ArrayList; +import java.util.Objects; import javax.inject.Inject; @@ -79,6 +80,7 @@ public class ScannerManagerActivity extends AppCompatActivity { MaterialToolbar toolbar = findViewById(R.id.top_toolbar); setSupportActionBar(toolbar); + Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true); documentScanner.startScan(); // Init @@ -102,6 +104,9 @@ public class ScannerManagerActivity extends AppCompatActivity { // TODO-rca: 保存処理 Toast.makeText(this, "保存処理", Toast.LENGTH_SHORT).show(); return true; + } else if (item.getItemId() == android.R.id.home) { + finish(); + return true; } return super.onOptionsItemSelected(item); }