aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/ui
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2015-02-07 15:36:28 +0100
committerBananeweizen <bananeweizen@gmx.de>2015-02-07 15:36:28 +0100
commit5e89b0198913320df5eb227479aa88413c33e528 (patch)
tree2182f50b71c48f543f5710c6914f56a5917f22c0 /main/src/cgeo/geocaching/ui
parent9c06f6857abd8e7ab43fcf0b0267ca9e812ba983 (diff)
downloadcgeo-5e89b0198913320df5eb227479aa88413c33e528.zip
cgeo-5e89b0198913320df5eb227479aa88413c33e528.tar.gz
cgeo-5e89b0198913320df5eb227479aa88413c33e528.tar.bz2
refactoring: extract common code
Diffstat (limited to 'main/src/cgeo/geocaching/ui')
-rw-r--r--main/src/cgeo/geocaching/ui/AbstractMenuActionProvider.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/ui/AbstractMenuActionProvider.java b/main/src/cgeo/geocaching/ui/AbstractMenuActionProvider.java
new file mode 100644
index 0000000..fbea675
--- /dev/null
+++ b/main/src/cgeo/geocaching/ui/AbstractMenuActionProvider.java
@@ -0,0 +1,24 @@
+package cgeo.geocaching.ui;
+
+import android.content.Context;
+import android.support.v4.view.ActionProvider;
+import android.view.View;
+
+public abstract class AbstractMenuActionProvider extends ActionProvider {
+
+ public AbstractMenuActionProvider(final Context context) {
+ super(context);
+ }
+
+ @Override
+ public boolean hasSubMenu() {
+ return true;
+ }
+
+ @Override
+ public View onCreateActionView() {
+ // must return null, otherwise the menu will not work
+ return null;
+ }
+
+}