android: Offer "Save" entry independent of edit actions
Move the "Save" menu entry out of "group_edit_actions", which gets hidden when switching from edit to view mode when the experimental editing feature is enabled in Android Viewer. This e.g. makes sure that the "Save" entry is offered for the following scenario (just as the "Save as" entry is as well): * ensure experimental editing feature is enabled * open existing doc * edit the document * switch back to view mode by tapping the left-most item in the editing toolbar Since the doc was modified, the "Save" entry should be present then. Explicitly hide the entry when the experimental editing feature is disabled, since that no longer happens through "group_edit_actions" now. Change-Id: Ibe7736932021d7516e2fd3a09ae9276015fe0d56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144872 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
parent
57d79744c7
commit
d993327eab
@ -35,15 +35,17 @@
|
||||
android:title="@string/action_UNO_commands"
|
||||
android:orderInCategory="100" />
|
||||
|
||||
<item android:id="@+id/action_save"
|
||||
android:title="@string/action_save"
|
||||
android:orderInCategory="100" />
|
||||
</group>
|
||||
|
||||
<group android:id="@+id/group_misc_actions"
|
||||
tools:visible="true"
|
||||
android:visible="false">
|
||||
|
||||
<item android:id="@+id/action_save"
|
||||
android:title="@string/action_save"
|
||||
android:orderInCategory="100"
|
||||
android:visible="true" />
|
||||
|
||||
<item android:id="@+id/action_save_as"
|
||||
android:title="@string/action_save_as"
|
||||
android:orderInCategory="100"
|
||||
|
@ -245,6 +245,8 @@ public class ToolbarController implements Toolbar.OnMenuItemClickListener {
|
||||
// but current document is readonly
|
||||
Toast.makeText(mContext, mContext.getString(R.string.readonly_file), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
} else {
|
||||
hideItem(R.id.action_save);
|
||||
}
|
||||
mMainMenu.findItem(R.id.action_parts).setVisible(mContext.isDrawerEnabled());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user