mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
終了ボタンを実装
This commit is contained in:
parent
d01f5b9c79
commit
24e54ec0f0
|
@ -21,6 +21,7 @@ import com.google.android.material.appbar.MaterialToolbar;
|
||||||
import com.websitebeaver.documentscanner.DocumentScanner;
|
import com.websitebeaver.documentscanner.DocumentScanner;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
@ -79,6 +80,7 @@ public class ScannerManagerActivity extends AppCompatActivity {
|
||||||
|
|
||||||
MaterialToolbar toolbar = findViewById(R.id.top_toolbar);
|
MaterialToolbar toolbar = findViewById(R.id.top_toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
|
Objects.requireNonNull(getSupportActionBar()).setDisplayHomeAsUpEnabled(true);
|
||||||
|
|
||||||
documentScanner.startScan();
|
documentScanner.startScan();
|
||||||
// Init
|
// Init
|
||||||
|
@ -102,6 +104,9 @@ public class ScannerManagerActivity extends AppCompatActivity {
|
||||||
// TODO-rca: 保存処理
|
// TODO-rca: 保存処理
|
||||||
Toast.makeText(this, "保存処理", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "保存処理", Toast.LENGTH_SHORT).show();
|
||||||
return true;
|
return true;
|
||||||
|
} else if (item.getItemId() == android.R.id.home) {
|
||||||
|
finish();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user