summaryrefslogtreecommitdiffstats
path: root/res/layout/edit_event_custom_actionbar.xml
diff options
context:
space:
mode:
authorAndy Huang <ath@google.com>2011-09-01 20:38:43 -0700
committerAndy Huang <ath@google.com>2011-09-02 15:29:54 -0700
commit135b2d4f40a3ed618e900960fc32344e72adab3c (patch)
treee1c8b390a04b16120ab8bffcf0f43c8bd4228493 /res/layout/edit_event_custom_actionbar.xml
parent1784d2de8ee81c6759bef7199a902e13de3b300f (diff)
downloadandroid_packages_apps_Calendar-135b2d4f40a3ed618e900960fc32344e72adab3c.tar.gz
android_packages_apps_Calendar-135b2d4f40a3ed618e900960fc32344e72adab3c.tar.bz2
android_packages_apps_Calendar-135b2d4f40a3ed618e900960fc32344e72adab3c.zip
use custom action bar in single-pane to override default action buttons
Hide app icon when creating/editing. Also show a custom title on tablets (multi-pane mode). In single-pane mode, don't use a normal action bar menu. Set up a custom action bar view with action-button-like buttons that take up the entire horizontal area instead of clustering at the right. Bug: 5204581 Change-Id: Ia3de60cd28839d570697a7fd7f0ebc5d41c38b18
Diffstat (limited to 'res/layout/edit_event_custom_actionbar.xml')
-rw-r--r--res/layout/edit_event_custom_actionbar.xml54
1 files changed, 54 insertions, 0 deletions
diff --git a/res/layout/edit_event_custom_actionbar.xml b/res/layout/edit_event_custom_actionbar.xml
new file mode 100644
index 00000000..2b9b624b
--- /dev/null
+++ b/res/layout/edit_event_custom_actionbar.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2011 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:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:orientation="horizontal"
+ android:divider="?android:attr/dividerVertical"
+ android:dividerPadding="12dip"
+ android:showDividers="middle">
+
+ <!-- id must match corresponding menu item id -->
+ <LinearLayout
+ android:id="@+id/action_cancel"
+ style="@style/EditEventCustomActionButton">
+
+ <ImageView
+ android:src="@drawable/ic_menu_cancel_holo_light"
+ style="@style/EditEventCustomActionButtonImage" />
+ <TextView
+ android:text="@string/discard_label"
+ style="@style/EditEventCustomActionButtonText" />
+
+ </LinearLayout>
+
+ <!-- id must match corresponding menu item id -->
+ <LinearLayout
+ android:id="@+id/action_done"
+ style="@style/EditEventCustomActionButton">
+
+ <ImageView
+ android:src="@drawable/ic_menu_done_holo_light"
+ style="@style/EditEventCustomActionButtonImage" />
+ <TextView
+ android:text="@string/save_label"
+ style="@style/EditEventCustomActionButtonText" />
+
+ </LinearLayout>
+
+
+</LinearLayout>