Skip to content
Browse files

Merge pull request #78 from dbs/fix_menu

Move preferences into overflow menu on each tab
  • Loading branch information...
2 parents b6f0fa9 + 0d7f554 commit bd4b85b91c6e0fd1b77acbf5198ababcf4205686 @thasmin committed Jul 2, 2012
View
9 res/menu/base.xml
@@ -0,0 +1,9 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item
+ android:id="@+id/preferences"
+ android:icon="@android:drawable/ic_menu_preferences"
+ android:showAsAction="never"
+ android:title="@string/preferences"/>
+
+</menu>
View
2 res/menu/downloadlist_activity.xml
@@ -9,7 +9,7 @@
<item
android:id="@+id/preferences"
android:icon="@android:drawable/ic_menu_preferences"
- android:showAsAction="ifRoom|withText"
+ android:showAsAction="never"
android:title="@string/preferences"/>
</menu>
View
15 res/menu/podcast_list.xml
@@ -1,4 +1,13 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:title="@string/refresh_subscription" android:id="@+id/refresh_subscription"/>
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item
+ android:id="@+id/refresh_subscription"
+ android:title="@string/refresh_subscription"/>
+ <item
+ android:id="@+id/preferences"
+ android:icon="@android:drawable/ic_menu_preferences"
+ android:showAsAction="never"
+ android:title="@string/preferences"/>
+
</menu>
View
5 res/menu/subscriptionlist_activity.xml
@@ -11,5 +11,10 @@
android:icon="@drawable/ic_menu_refresh"
android:showAsAction="ifRoom|withText"
android:title="@string/refresh"/>
+ <item
+ android:id="@+id/preferences"
+ android:icon="@android:drawable/ic_menu_preferences"
+ android:menuCategory="system"
+ android:title="@string/preferences"/>
</menu>
View
9 src/com/axelby/podax/ui/MainActivity.java
@@ -109,12 +109,15 @@ public boolean onCreateOptionsMenu(Menu menu) {
switch (_focusedPage) {
case TAB_SUBSCRIPTIONS:
inflater.inflate(R.menu.subscriptionlist_activity, menu);
- return true;
+ break;
case TAB_DOWNLOADS:
inflater.inflate(R.menu.downloadlist_activity, menu);
- return true;
+ break;
+ default:
+ inflater.inflate(R.menu.base, menu);
}
- return false;
+
+ return true;
}
@Override

0 comments on commit bd4b85b

Please sign in to comment.
Something went wrong with that request. Please try again.