summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorOwen Lin <owenlin@google.com>2012-07-17 16:50:31 +0800
committerOwen Lin <owenlin@google.com>2012-08-15 16:57:18 +0800
commitd84941f0649c751c0cc5fd2f6b233380e878ca26 (patch)
treecada801521d738bff0839994c445eaaf64ce16e2 /res
parent2bb717f1ea38e2ce33dd102a23afe6bfacb5675c (diff)
downloadandroid_packages_apps_Gallery2-d84941f0649c751c0cc5fd2f6b233380e878ca26.tar.gz
android_packages_apps_Gallery2-d84941f0649c751c0cc5fd2f6b233380e878ca26.tar.bz2
android_packages_apps_Gallery2-d84941f0649c751c0cc5fd2f6b233380e878ca26.zip
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
Diffstat (limited to 'res')
-rw-r--r--res/layout/main.xml5
-rw-r--r--res/layout/simple_action_bar.xml31
2 files changed, 36 insertions, 0 deletions
diff --git a/res/layout/main.xml b/res/layout/main.xml
index d36730146..08e595959 100644
--- a/res/layout/main.xml
+++ b/res/layout/main.xml
@@ -5,6 +5,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<include layout="@layout/gl_root_group"/>
+ <FrameLayout android:id="@+id/header"
+ android:visibility="gone"
+ android:layout_alignParentTop="true"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"/>
<FrameLayout android:id="@+id/footer"
android:visibility="gone"
android:layout_alignParentBottom="true"
diff --git a/res/layout/simple_action_bar.xml b/res/layout/simple_action_bar.xml
new file mode 100644
index 000000000..be6a0607e
--- /dev/null
+++ b/res/layout/simple_action_bar.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/navigation_bar"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal">
+ <Button android:id="@+id/menu_button"
+ android:divider="?android:attr/listDividerAlertDialog"
+ style="?android:attr/borderlessButtonStyle"
+ android:singleLine="true"
+ android:gravity="left|center_vertical"
+ android:paddingRight="25dip"
+ android:layout_width="wrap_content"
+ android:layout_height="match_parent" />
+</LinearLayout>