mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-16 06:53:01 +00:00
Add a lock button to the menu bar
This commit is contained in:
parent
bfe7a1bde0
commit
1ae9364c5e
3 changed files with 21 additions and 6 deletions
|
@ -317,13 +317,18 @@ public class MainActivity extends AppCompatActivity {
|
|||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
if (item.getItemId() == R.id.action_settings) {
|
||||
Intent preferencesActivity = new Intent(this, PreferencesActivity.class);
|
||||
startActivity(preferencesActivity);
|
||||
return true;
|
||||
switch (item.getItemId()) {
|
||||
case R.id.action_settings:
|
||||
Intent preferencesActivity = new Intent(this, PreferencesActivity.class);
|
||||
startActivity(preferencesActivity);
|
||||
return true;
|
||||
case R.id.action_lock:
|
||||
// TODO: properly close the database
|
||||
recreate();
|
||||
return true;
|
||||
default:
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
private void initializeAppShortcuts()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue