diff options
author | Owen Lin <owenlin@google.com> | 2012-07-17 16:50:31 +0800 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2012-08-15 16:57:18 +0800 |
commit | fef28b97e8bd77ebd64f41b3b15c3cfd49529018 (patch) | |
tree | 18b9a7a6791c0f63a104efbcbfb438cff6ac9f67 /res | |
parent | 0bf21ae1aebc9e0d9a8c47fdd4712898ca62dbf1 (diff) | |
download | android_packages_apps_Snap-fef28b97e8bd77ebd64f41b3b15c3cfd49529018.tar.gz android_packages_apps_Snap-fef28b97e8bd77ebd64f41b3b15c3cfd49529018.tar.bz2 android_packages_apps_Snap-fef28b97e8bd77ebd64f41b3b15c3cfd49529018.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.xml | 5 | ||||
-rw-r--r-- | res/layout/simple_action_bar.xml | 31 |
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> |