From 00e4a6e52dab2f7ef3f6574f20a12d4a39e76124 Mon Sep 17 00:00:00 2001 From: Owen Lin Date: Tue, 17 Jul 2012 16:50:31 +0800 Subject: Add SimpleMenuXXX implementation for the Gingerbread platform. 1. Add a SimpleMenuInflator to parse the res/menu/xxx.xml files. 2. Add minimal code to show the menu. **NOTE** This change is going to be replaced by the ActionBar compat library when it gets ready and integrated. The purpose of this change is making Gallery/Camera run on GB. Change-Id: Ia7d402c82a6da1b9558ebbd103e161d2471b34dd --- gallerycommon/src/com/android/gallery3d/common/ApiHelper.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gallerycommon/src/com/android/gallery3d/common') diff --git a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java index 9beac8807..406c5263c 100644 --- a/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java +++ b/gallerycommon/src/com/android/gallery3d/common/ApiHelper.java @@ -163,10 +163,13 @@ public class ApiHelper { public static final boolean HAS_SURFACE_TEXTURE_RECORDING = Build.VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN; - + public static final boolean HAS_MENU_ITEM_SHOW_AS_ACTION = Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB; + public static final boolean HAS_ACTION_BAR = + Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB; + private static boolean hasField(Class klass, String fieldName) { try { klass.getDeclaredField(fieldName); -- cgit v1.2.3