Done Bar pattern sample

Change-Id: I8b979bb1ce8480f699665eede3cbf7aac110634e
diff --git a/ui/actionbar/DoneBar/AndroidManifest.xml b/ui/actionbar/DoneBar/AndroidManifest.xml
new file mode 100755
index 0000000..5536a9b
--- /dev/null
+++ b/ui/actionbar/DoneBar/AndroidManifest.xml
@@ -0,0 +1,45 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.android.donebar"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17" />
+
+    <application android:label="@string/app_name"
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/Theme.Sample"
+        android:allowBackup="true">
+
+        <activity android:name=".MainActivity"
+            android:label="@string/app_name">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+
+        <activity android:name=".DoneBarActivity"
+            android:parentActivityName=".MainActivity" />
+
+        <activity android:name=".DoneButtonActivity"
+            android:parentActivityName=".MainActivity" />
+
+    </application>
+
+</manifest>
diff --git a/ui/actionbar/DoneBar/big_icon.png b/ui/actionbar/DoneBar/big_icon.png
new file mode 100644
index 0000000..78bb426
--- /dev/null
+++ b/ui/actionbar/DoneBar/big_icon.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/drawable-hdpi/ic_action_cancel.png b/ui/actionbar/DoneBar/res/drawable-hdpi/ic_action_cancel.png
new file mode 100644
index 0000000..cde36e1
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/drawable-hdpi/ic_action_cancel.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/drawable-hdpi/ic_action_done.png b/ui/actionbar/DoneBar/res/drawable-hdpi/ic_action_done.png
new file mode 100644
index 0000000..58bf972
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/drawable-hdpi/ic_action_done.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/drawable-hdpi/ic_launcher.png b/ui/actionbar/DoneBar/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..b1efaf4
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/drawable-mdpi/ic_action_cancel.png b/ui/actionbar/DoneBar/res/drawable-mdpi/ic_action_cancel.png
new file mode 100644
index 0000000..9f4c3d6
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/drawable-mdpi/ic_action_cancel.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/drawable-mdpi/ic_action_done.png b/ui/actionbar/DoneBar/res/drawable-mdpi/ic_action_done.png
new file mode 100644
index 0000000..cf5fab3
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/drawable-mdpi/ic_action_done.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/drawable-mdpi/ic_launcher.png b/ui/actionbar/DoneBar/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..f5f9244
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/drawable-xhdpi/ic_action_cancel.png b/ui/actionbar/DoneBar/res/drawable-xhdpi/ic_action_cancel.png
new file mode 100644
index 0000000..ca7d159
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/drawable-xhdpi/ic_action_cancel.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/drawable-xhdpi/ic_action_done.png b/ui/actionbar/DoneBar/res/drawable-xhdpi/ic_action_done.png
new file mode 100644
index 0000000..b891571
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/drawable-xhdpi/ic_action_done.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/drawable-xhdpi/ic_launcher.png b/ui/actionbar/DoneBar/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..5d07b3f
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbar/DoneBar/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..6ef21e1
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/res/layout/actionbar_custom_view_done.xml b/ui/actionbar/DoneBar/res/layout/actionbar_custom_view_done.xml
new file mode 100644
index 0000000..44c1d61
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/layout/actionbar_custom_view_done.xml
@@ -0,0 +1,26 @@
+<!--
+  Copyright 2013 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:showDividers="end"
+    android:dividerPadding="12dp">
+
+    <include layout="@layout/include_done_button" />
+</LinearLayout>
diff --git a/ui/actionbar/DoneBar/res/layout/actionbar_custom_view_done_cancel.xml b/ui/actionbar/DoneBar/res/layout/actionbar_custom_view_done_cancel.xml
new file mode 100644
index 0000000..5cecdf0
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/layout/actionbar_custom_view_done_cancel.xml
@@ -0,0 +1,27 @@
+<!--
+  Copyright 2013 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:showDividers="middle"
+    android:dividerPadding="12dp">
+
+    <include layout="@layout/include_cancel_button" />
+    <include layout="@layout/include_done_button" />
+</LinearLayout>
diff --git a/ui/actionbar/DoneBar/res/layout/activity_done_bar.xml b/ui/actionbar/DoneBar/res/layout/activity_done_bar.xml
new file mode 100755
index 0000000..cb8980f
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/layout/activity_done_bar.xml
@@ -0,0 +1,32 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout style="@style/Widget.SampleContentContainer"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <TextView style="@style/Widget.SampleMessage"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/done_bar_description" />
+
+    </LinearLayout>
+</ScrollView>
diff --git a/ui/actionbar/DoneBar/res/layout/activity_done_button.xml b/ui/actionbar/DoneBar/res/layout/activity_done_button.xml
new file mode 100755
index 0000000..3e20455
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/layout/activity_done_button.xml
@@ -0,0 +1,32 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout style="@style/Widget.SampleContentContainer"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <TextView style="@style/Widget.SampleMessage"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/done_button_description" />
+
+    </LinearLayout>
+</ScrollView>
diff --git a/ui/actionbar/DoneBar/res/layout/activity_main.xml b/ui/actionbar/DoneBar/res/layout/activity_main.xml
new file mode 100755
index 0000000..e342ca3
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/layout/activity_main.xml
@@ -0,0 +1,58 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent">
+
+    <LinearLayout style="@style/Widget.SampleContentContainer"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="vertical">
+
+        <TextView style="@style/Widget.SampleMessage"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/intro_message" />
+
+        <Button style="@style/Widget.SampleButton"
+            android:id="@+id/done_bar_link"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/margin_large"
+            android:layout_marginBottom="@dimen/margin_small"
+            android:text="@string/done_bar_title" />
+
+        <TextView style="@style/Widget.SampleMessage"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/done_bar_description" />
+
+        <Button style="@style/Widget.SampleButton"
+            android:id="@+id/done_button_link"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginTop="@dimen/margin_large"
+            android:layout_marginBottom="@dimen/margin_small"
+            android:text="@string/done_button_title" />
+
+        <TextView style="@style/Widget.SampleMessage"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:text="@string/done_button_description" />
+
+    </LinearLayout>
+</ScrollView>
diff --git a/ui/actionbar/DoneBar/res/layout/include_cancel_button.xml b/ui/actionbar/DoneBar/res/layout/include_cancel_button.xml
new file mode 100644
index 0000000..bffffa6
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/layout/include_cancel_button.xml
@@ -0,0 +1,33 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    style="?android:actionButtonStyle"
+    android:id="@+id/actionbar_cancel"
+    android:layout_width="0dp"
+    android:layout_height="match_parent"
+    android:layout_weight="1">
+
+    <TextView style="?android:actionBarTabTextStyle"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:paddingRight="20dp"
+        android:drawableLeft="@drawable/ic_action_cancel"
+        android:drawablePadding="8dp"
+        android:gravity="center_vertical"
+        android:text="@string/cancel" />
+</FrameLayout>
diff --git a/ui/actionbar/DoneBar/res/layout/include_done_button.xml b/ui/actionbar/DoneBar/res/layout/include_done_button.xml
new file mode 100644
index 0000000..9207733
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/layout/include_done_button.xml
@@ -0,0 +1,33 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    style="?android:actionButtonStyle"
+    android:id="@+id/actionbar_done"
+    android:layout_width="0dp"
+    android:layout_height="match_parent"
+    android:layout_weight="1">
+
+    <TextView style="?android:actionBarTabTextStyle"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_gravity="center"
+        android:paddingRight="20dp"
+        android:drawableLeft="@drawable/ic_action_done"
+        android:drawablePadding="8dp"
+        android:gravity="center_vertical"
+        android:text="@string/done" />
+</FrameLayout>
diff --git a/ui/actionbar/DoneBar/res/menu/cancel.xml b/ui/actionbar/DoneBar/res/menu/cancel.xml
new file mode 100644
index 0000000..18e3eed
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/menu/cancel.xml
@@ -0,0 +1,22 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/cancel"
+        android:title="@string/cancel"
+        android:icon="@drawable/ic_action_cancel"
+        android:showAsAction="never" />
+</menu>
diff --git a/ui/actionbar/DoneBar/res/values-sw600dp/styles.xml b/ui/actionbar/DoneBar/res/values-sw600dp/styles.xml
new file mode 100644
index 0000000..8b7fa45
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/values-sw600dp/styles.xml
@@ -0,0 +1,39 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <style name="Widget.SampleContentContainer">
+        <item name="android:paddingTop">@dimen/margin_medium</item>
+        <item name="android:paddingBottom">@dimen/margin_medium</item>
+        <item name="android:paddingLeft">@dimen/margin_huge</item>
+        <item name="android:paddingRight">@dimen/margin_huge</item>
+    </style>
+
+    <style name="Widget.SampleMessage">
+        <item name="android:textAppearance">?android:textAppearanceLarge</item>
+        <item name="android:lineSpacingMultiplier">1.2</item>
+    </style>
+
+    <style name="Widget.SampleButton" parent="android:Widget.Holo.Light.Button">
+        <item name="android:textAppearance">?android:textAppearanceLarge</item>
+        <item name="android:paddingTop">@dimen/margin_medium</item>
+        <item name="android:paddingBottom">@dimen/margin_medium</item>
+        <item name="android:paddingLeft">@dimen/margin_large</item>
+        <item name="android:paddingRight">@dimen/margin_large</item>
+    </style>
+
+</resources>
diff --git a/ui/actionbar/DoneBar/res/values/dimens.xml b/ui/actionbar/DoneBar/res/values/dimens.xml
new file mode 100644
index 0000000..952c220
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/values/dimens.xml
@@ -0,0 +1,27 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Define standard dimensions to comply with Holo-style grids and rhythm. -->
+
+    <dimen name="margin_tiny">4dp</dimen>
+    <dimen name="margin_small">8dp</dimen>
+    <dimen name="margin_medium">16dp</dimen>
+    <dimen name="margin_large">32dp</dimen>
+    <dimen name="margin_huge">64dp</dimen>
+
+</resources>
diff --git a/ui/actionbar/DoneBar/res/values/strings.xml b/ui/actionbar/DoneBar/res/values/strings.xml
new file mode 100755
index 0000000..b56d75a
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/values/strings.xml
@@ -0,0 +1,32 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+    <string name="app_name">Done Bar</string>
+
+    <!-- Sample UI messages -->
+    <string name="intro_message">This sample demonstrates two alternative presentations of the action bar that are well-suited for <b>simple data entry scenarios</b>.</string>
+
+    <string name="done_bar_title">Done bar</string>
+    <string name="done_bar_description">In this presentation, a <b>done bar</b> replaces the action bar entirely, providing two direct actions to persist or dismiss changes. This is suitable for cases where no additional view details or actions are needed in the action bar.</string>
+
+    <string name="done_button_title">Done button</string>
+    <string name="done_button_description">In this presentation, a <b>done button</b> replaces the action bar\'s <i>Up</i> affordance and app icon, while the cancel action is made available in the action overflow. This is well-suited to scenarios where additional view details or actions may be needed in the action bar.</string>
+
+    <!-- Done bar strings -->
+    <string name="done">Done</string>
+    <string name="cancel">Cancel</string>
+</resources>
diff --git a/ui/actionbar/DoneBar/res/values/styles.xml b/ui/actionbar/DoneBar/res/values/styles.xml
new file mode 100644
index 0000000..80895ef
--- /dev/null
+++ b/ui/actionbar/DoneBar/res/values/styles.xml
@@ -0,0 +1,42 @@
+<!--
+  Copyright 2013 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.
+  -->
+
+<resources>
+
+    <!-- Activity themes -->
+
+    <style name="Theme.Base" parent="android:Theme.Holo.Light" />
+
+    <style name="Theme.Sample" parent="Theme.Base" />
+
+    <!-- Widget styling -->
+
+    <style name="Widget" />
+
+    <style name="Widget.SampleContentContainer">
+        <item name="android:padding">@dimen/margin_medium</item>
+    </style>
+
+    <style name="Widget.SampleMessage">
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
+    </style>
+
+    <style name="Widget.SampleButton" parent="android:Widget.Holo.Light.Button">
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+    </style>
+
+</resources>
diff --git a/ui/actionbar/DoneBar/src/com/example/android/donebar/DoneBarActivity.java b/ui/actionbar/DoneBar/src/com/example/android/donebar/DoneBarActivity.java
new file mode 100644
index 0000000..f2a2b00
--- /dev/null
+++ b/ui/actionbar/DoneBar/src/com/example/android/donebar/DoneBarActivity.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2013 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.
+ */
+
+package com.example.android.donebar;
+
+import android.app.ActionBar;
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+
+/**
+ * A sample activity demonstrating the "done bar" alternative action bar presentation. For a more
+ * detailed description see {@link R.string.done_bar_description}.
+ */
+public class DoneBarActivity extends Activity {
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // BEGIN_INCLUDE (inflate_set_custom_view)
+        // Inflate a "Done/Cancel" custom action bar view.
+        final LayoutInflater inflater = (LayoutInflater) getActionBar().getThemedContext()
+                .getSystemService(LAYOUT_INFLATER_SERVICE);
+        final View customActionBarView = inflater.inflate(
+                R.layout.actionbar_custom_view_done_cancel, null);
+        customActionBarView.findViewById(R.id.actionbar_done).setOnClickListener(
+                new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        // "Done"
+                        finish();
+                    }
+                });
+        customActionBarView.findViewById(R.id.actionbar_cancel).setOnClickListener(
+                new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        // "Cancel"
+                        finish();
+                    }
+                });
+
+        // Show the custom action bar view and hide the normal Home icon and title.
+        final ActionBar actionBar = getActionBar();
+        actionBar.setDisplayOptions(
+                ActionBar.DISPLAY_SHOW_CUSTOM,
+                ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME
+                        | ActionBar.DISPLAY_SHOW_TITLE);
+        actionBar.setCustomView(customActionBarView,
+                new ActionBar.LayoutParams(
+                        ViewGroup.LayoutParams.MATCH_PARENT,
+                        ViewGroup.LayoutParams.MATCH_PARENT));
+        // END_INCLUDE (inflate_set_custom_view)
+
+        setContentView(R.layout.activity_done_bar);
+    }
+}
diff --git a/ui/actionbar/DoneBar/src/com/example/android/donebar/DoneButtonActivity.java b/ui/actionbar/DoneBar/src/com/example/android/donebar/DoneButtonActivity.java
new file mode 100644
index 0000000..303d1ed
--- /dev/null
+++ b/ui/actionbar/DoneBar/src/com/example/android/donebar/DoneButtonActivity.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2013 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.
+ */
+
+package com.example.android.donebar;
+
+import android.app.ActionBar;
+import android.app.Activity;
+import android.os.Bundle;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+
+/**
+ * A sample activity demonstrating the "done button" alternative action bar presentation. For a more
+ * detailed description see {@link R.string.done_button_description}.
+ */
+public class DoneButtonActivity extends Activity {
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // BEGIN_INCLUDE (inflate_set_custom_view)
+        // Inflate a "Done" custom action bar view to serve as the "Up" affordance.
+        final LayoutInflater inflater = (LayoutInflater) getActionBar().getThemedContext()
+                .getSystemService(LAYOUT_INFLATER_SERVICE);
+        final View customActionBarView = inflater.inflate(
+                R.layout.actionbar_custom_view_done, null);
+        customActionBarView.findViewById(R.id.actionbar_done).setOnClickListener(
+                new View.OnClickListener() {
+                    @Override
+                    public void onClick(View v) {
+                        // "Done"
+                        finish();
+                    }
+                });
+
+        // Show the custom action bar view and hide the normal Home icon and title.
+        final ActionBar actionBar = getActionBar();
+        actionBar.setDisplayOptions(
+                ActionBar.DISPLAY_SHOW_CUSTOM,
+                ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME
+                        | ActionBar.DISPLAY_SHOW_TITLE);
+        actionBar.setCustomView(customActionBarView);
+        // END_INCLUDE (inflate_set_custom_view)
+
+        setContentView(R.layout.activity_done_button);
+    }
+
+    // BEGIN_INCLUDE (handle_cancel)
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        super.onCreateOptionsMenu(menu);
+        getMenuInflater().inflate(R.menu.cancel, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.cancel:
+                // "Cancel"
+                finish();
+                return true;
+        }
+        return super.onOptionsItemSelected(item);
+    }
+    // END_INCLUDE (handle_cancel)
+}
diff --git a/ui/actionbar/DoneBar/src/com/example/android/donebar/MainActivity.java b/ui/actionbar/DoneBar/src/com/example/android/donebar/MainActivity.java
new file mode 100755
index 0000000..ff188df
--- /dev/null
+++ b/ui/actionbar/DoneBar/src/com/example/android/donebar/MainActivity.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2013 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.
+ */
+
+package com.example.android.donebar;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+
+/**
+ * A simple launcher activity describing the alternative action bar presentations and allowing the
+ * user to navigate to a demo of each.
+ */
+public class MainActivity extends Activity {
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+
+        findViewById(R.id.done_bar_link).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                startActivity(new Intent(MainActivity.this, DoneBarActivity.class));
+            }
+        });
+
+        findViewById(R.id.done_button_link).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                startActivity(new Intent(MainActivity.this, DoneButtonActivity.class));
+            }
+        });
+    }
+}