mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Add lock button always visible
This commit is contained in:
@@ -467,6 +467,7 @@ public class EntryEditActivity extends LockingHideActivity
|
||||
super.onCreateOptionsMenu(menu);
|
||||
|
||||
MenuInflater inflater = getMenuInflater();
|
||||
inflater.inflate(R.menu.database_lock, menu);
|
||||
MenuUtil.INSTANCE.contributionMenuInflater(inflater, menu);
|
||||
|
||||
return true;
|
||||
@@ -474,6 +475,10 @@ public class EntryEditActivity extends LockingHideActivity
|
||||
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch ( item.getItemId() ) {
|
||||
case R.id.menu_lock:
|
||||
lockAndExit();
|
||||
return true;
|
||||
|
||||
case R.id.menu_contribute:
|
||||
return MenuUtil.INSTANCE.onContributionItemSelected(this);
|
||||
|
||||
|
||||
@@ -23,5 +23,5 @@
|
||||
android:icon="@drawable/ic_lock_white_24dp"
|
||||
android:title="@string/menu_lock"
|
||||
android:orderInCategory="81"
|
||||
app:showAsAction="ifRoom" />
|
||||
app:showAsAction="always" />
|
||||
</menu>
|
||||
@@ -28,7 +28,7 @@
|
||||
android:icon="@drawable/ic_mode_edit_white_24dp"
|
||||
android:title="@string/menu_edit"
|
||||
android:orderInCategory="22"
|
||||
app:showAsAction="always" />
|
||||
app:showAsAction="ifRoom" />
|
||||
<item android:id="@+id/menu_goto_url"
|
||||
android:icon="@drawable/ic_launch_white_24dp"
|
||||
android:title="@string/menu_url"
|
||||
|
||||
Reference in New Issue
Block a user