アクションをメニューに合わせて更新 WIP

This commit is contained in:
ろむねこ 2024-01-16 12:15:16 +09:00
parent 680b101476
commit 3eac0cf49c
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -98,13 +98,14 @@ public class ScannerManagerActivity extends AppCompatActivity {
@Override @Override
public boolean onOptionsItemSelected(android.view.MenuItem item) { public boolean onOptionsItemSelected(android.view.MenuItem item) {
if (item.getItemId() == R.id.action_close) { if (item.getItemId() == R.id.action_save_new) {
finish(); // 新ドキュメントとして保存
return true;
} else if (item.getItemId() == R.id.action_save) {
// TODO-rca: 保存処理
Toast.makeText(this, "保存処理", Toast.LENGTH_SHORT).show(); Toast.makeText(this, "保存処理", Toast.LENGTH_SHORT).show();
return true; return true;
} else if (item.getItemId() == R.id.action_insert_exist) {
// 既存ドキュメントに挿入
Toast.makeText(this, "挿入処理", Toast.LENGTH_SHORT).show();
return true;
} else if (item.getItemId() == android.R.id.home) { } else if (item.getItemId() == android.R.id.home) {
finish(); finish();
return true; return true;