Android: Add save button to cheats activity

By request. Matches the settings activity.
This commit is contained in:
JosJuice 2021-09-09 19:27:44 +02:00
parent ffa25c4cf5
commit 0ca4c6dbd4
1 changed files with 24 additions and 0 deletions

View File

@ -5,6 +5,9 @@ package org.dolphinemu.dolphinemu.features.cheats.ui;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Bundle; import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -93,6 +96,27 @@ public class CheatsActivity extends AppCompatActivity
mViewModel.getOpenDetailsViewEvent().observe(this, this::openDetailsView); mViewModel.getOpenDetailsViewEvent().observe(this, this::openDetailsView);
} }
@Override
public boolean onCreateOptionsMenu(Menu menu)
{
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_settings, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
if (item.getItemId() == R.id.menu_save_exit)
{
finish();
return true;
}
return false;
}
@Override @Override
protected void onStop() protected void onStop()
{ {