diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-11-29 12:11:48 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-11-29 12:24:32 +0100 |
commit | 5386ce98300bbd1a8d2bda1342f6963ebb4e1a06 (patch) | |
tree | 7225c0f01d4c3dcbb5358b89c814a2071a138641 /android | |
parent | ecc8cee84f507fe950d71297fc6771aad82765cc (diff) |
sdremote: allow accessing options menu from the selector activity as well
The options menu had 3 items, only one required a connection, so show
the rest when selecting servers.
Change-Id: I70797be5fc8f0550380286e0cff2abbf4664591b
Diffstat (limited to 'android')
-rw-r--r-- | android/sdremote/res/menu/actionbar_selector.xml | 18 | ||||
-rw-r--r-- | android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java | 10 |
2 files changed, 28 insertions, 0 deletions
diff --git a/android/sdremote/res/menu/actionbar_selector.xml b/android/sdremote/res/menu/actionbar_selector.xml new file mode 100644 index 000000000000..f70139e0e39a --- /dev/null +++ b/android/sdremote/res/menu/actionbar_selector.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<menu xmlns:android="http://schemas.android.com/apk/res/android" > + + <item + android:id="@+id/actionbar_presentation_submenu" + android:showAsAction="always" + android:icon="@drawable/actionbar_icon_overflow"> + <menu> + <item + android:id="@+id/actionbar_presentation_submenu_options" + android:title="@string/options"/> + <item + android:id="@+id/actionbar_presentation_submenu_about" + android:title="@string/about"/> + </menu> + </item> + +</menu> diff --git a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java index b5e75d489b74..e9d0686992b5 100644 --- a/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java +++ b/android/sdremote/src/org/libreoffice/impressremote/SelectorActivity.java @@ -91,6 +91,7 @@ public class SelectorActivity extends SherlockActivity { public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getSupportMenuInflater(); inflater.inflate(R.menu.selector_activity, menu); + inflater.inflate(R.menu.actionbar_selector, menu); return true; } @@ -135,6 +136,15 @@ public class SelectorActivity extends SherlockActivity { alertDialog.show(); return true; + case R.id.actionbar_presentation_submenu_options: + Intent aIntent = new Intent(this, SettingsActivity.class); + startActivity(aIntent); + return true; + case R.id.actionbar_presentation_submenu_about: + AboutDialogBuilder aBuilder = new AboutDialogBuilder(this); + AlertDialog aDialog = aBuilder.create(); + aDialog.show(); + return true; } return super.onOptionsItemSelected(item); } |