am 29757951: am 53cf2eb9: Merge "Add CustomNotifications sample" into jb-mr2-dev

* commit '297579515079b44c07182282a8981a14d349ab51':
  Add CustomNotifications sample
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/build.gradle b/ui/notifications/CustomNotifications/CustomNotifications/build.gradle
new file mode 100644
index 0000000..47fc855
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/build.gradle
@@ -0,0 +1,10 @@
+apply plugin: 'android'
+
+dependencies {
+    compile 'com.android.support:support-v4:18.0.0+'
+}
+
+android {
+    compileSdkVersion 18
+    buildToolsVersion "18.0.0"
+}
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/AndroidManifest.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..8821b1a
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/AndroidManifest.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  * Copyright (C) 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.customnotifications"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="4"
+        android:targetSdkVersion="18" />
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name="com.example.android.customnotifications.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>
+    </application>
+
+</manifest>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/java/com/example/android/customnotifications/MainActivity.java b/ui/notifications/CustomNotifications/CustomNotifications/src/main/java/com/example/android/customnotifications/MainActivity.java
new file mode 100644
index 0000000..eae95f1
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/java/com/example/android/customnotifications/MainActivity.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright (C) 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.customnotifications;
+
+import android.app.Activity;
+import android.app.Notification;
+import android.app.NotificationManager;
+import android.app.PendingIntent;
+import android.content.Intent;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.v4.app.NotificationCompat;
+import android.view.View;
+import android.widget.RemoteViews;
+
+import java.text.DateFormat;
+import java.util.Date;
+
+public class MainActivity extends Activity {
+    /**
+     * This sample demonstrates notifications with custom content views.
+     *
+     * <p>On API level 16 and above a big content view is also defined that is used for the
+     * 'expanded' notification. The notification is created by the NotificationCompat.Builder.
+     * The expanded content view is set directly on the {@link Notification} once it has been build.
+     * (See {@link Notification#bigContentView}.) </p>
+     *
+     * <p>The content views are inflated as {@link RemoteViews} directly from their XML layout
+     * definitions using {@link RemoteViews#RemoteViews(String, int)}.</p>
+     */
+    private void createNotification() {
+        // BEGIN_INCLUDE(notificationCompat)
+        NotificationCompat.Builder builder = new NotificationCompat.Builder(this);
+        // END_INCLUDE(notificationCompat)
+
+        // BEGIN_INCLUDE(intent)
+        //Create Intent to launch this Activity again if the notification is clicked.
+        Intent i = new Intent(this, MainActivity.class);
+        i.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
+        PendingIntent intent = PendingIntent.getActivity(this, 0, i,
+                PendingIntent.FLAG_UPDATE_CURRENT);
+        builder.setContentIntent(intent);
+        // END_INCLUDE(intent)
+
+        // BEGIN_INCLUDE(ticker)
+        // Sets the ticker text
+        builder.setTicker(getResources().getString(R.string.custom_notification));
+
+        // Sets the small icon for the ticker
+        builder.setSmallIcon(R.drawable.ic_stat_custom);
+        // END_INCLUDE(ticker)
+
+        // BEGIN_INCLUDE(buildNotification)
+        // Cancel the notification when clicked
+        builder.setAutoCancel(true);
+
+        // Build the notification
+        Notification notification = builder.build();
+        // END_INCLUDE(buildNotification)
+
+        // BEGIN_INCLUDE(customLayout)
+        // Inflate the notification layout as RemoteViews
+        RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.notification);
+
+        // Set text on a TextView in the RemoteViews programmatically.
+        final String time = DateFormat.getTimeInstance().format(new Date()).toString();
+        final String text = getResources().getString(R.string.collapsed, time);
+        contentView.setTextViewText(R.id.textView, text);
+
+        /* Workaround: Need to set the content view here directly on the notification.
+         * NotificationCompatBuilder contains a bug that prevents this from working on platform
+         * versions HoneyComb.
+         * See https://code.google.com/p/android/issues/detail?id=30495
+         */
+        notification.contentView = contentView;
+
+        // Add a big content view to the notification if supported.
+        // Support for expanded notifications was added in API level 16.
+        // (The normal contentView is shown when the notification is collapsed, when expanded the
+        // big content view set here is displayed.)
+        if (Build.VERSION.SDK_INT >= 16) {
+            // Inflate and set the layout for the expanded notification view
+            RemoteViews expandedView =
+                    new RemoteViews(getPackageName(), R.layout.notification_expanded);
+            notification.bigContentView = expandedView;
+        }
+        // END_INCLUDE(customLayout)
+
+        // START_INCLUDE(notify)
+        // Use the NotificationManager to show the notification
+        NotificationManager nm = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
+        nm.notify(0, notification);
+        // END_INCLUDE(notify)
+    }
+
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_main);
+    }
+
+    /**
+     * Create and show a notification with a custom layout.
+     * This callback is defined through the 'onClick' attribute of the
+     * 'Show Notification' button in the XML layout.
+     *
+     * @param v
+     */
+    public void showNotificationClicked(View v) {
+        createNotification();
+    }
+}
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v11/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v11/ic_stat_custom.png
new file mode 100644
index 0000000..db182ce
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v11/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v9/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v9/ic_stat_custom.png
new file mode 100644
index 0000000..c35f570
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v9/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_launcher.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_launcher.png
new file mode 100644
index 0000000..155ac98
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_stat_custom.png
new file mode 100644
index 0000000..b0434fd
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v11/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v11/ic_stat_custom.png
new file mode 100644
index 0000000..50e1b32
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v11/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v9/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v9/ic_stat_custom.png
new file mode 100644
index 0000000..d4de32a
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v9/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v11/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v11/ic_stat_custom.png
new file mode 100644
index 0000000..a46f47f
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v11/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v9/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v9/ic_stat_custom.png
new file mode 100644
index 0000000..2896b63
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v9/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_launcher.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_launcher.png
new file mode 100644
index 0000000..6e38dc6
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_stat_custom.png
new file mode 100644
index 0000000..304f7e9
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png
new file mode 100644
index 0000000..52f7df8
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png
new file mode 100644
index 0000000..5d2617e
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..638fc67
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_stat_custom.png
new file mode 100644
index 0000000..79c30a8
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_stat_custom.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot.png
new file mode 100644
index 0000000..e21ee75
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot_expanded.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot_expanded.png
new file mode 100644
index 0000000..f9469d4
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot_expanded.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..9a9a60c
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/activity_main.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..d67477d
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/activity_main.xml
@@ -0,0 +1,43 @@
+<!--
+  * Copyright (C) 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.
+  -->
+
+<!-- Layout for MainActivity.
+ Includes an introductory text and a button to show the notification. -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin"
+    android:paddingBottom="@dimen/activity_vertical_margin"
+    android:orientation="vertical"
+    tools:context=".MainActivity"
+    android:gravity="center_horizontal">
+
+    <TextView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/intro_text" />
+
+    <Button
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/show_notification"
+        android:id="@+id/button"
+        android:onClick="showNotificationClicked" />
+
+</LinearLayout>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification.xml
new file mode 100644
index 0000000..9d977d3
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+* Copyright (C) 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.
+-->
+
+<!-- Layout for the collapsed notification. -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:gravity="center_horizontal">
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:textAppearance="@style/NotificationContent"
+        android:id="@+id/textView"
+        android:gravity="center" />
+
+    <ImageView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/imageView"
+        android:src="@drawable/robot"
+        android:contentDescription="@string/collapsed_image" />
+
+
+</LinearLayout>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification_expanded.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification_expanded.xml
new file mode 100644
index 0000000..9d5a784
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification_expanded.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+* Copyright (C) 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.
+-->
+
+<!-- Layout for the expanded notification. -->
+
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="horizontal"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:gravity="right|top">
+
+
+    <RelativeLayout
+        android:layout_width="fill_parent"
+        android:layout_height="fill_parent">
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="@style/NotificationContent"
+            android:text="@string/expanded"
+            android:layout_gravity="center_vertical"
+            android:layout_alignParentTop="false"
+            android:layout_alignParentLeft="true"
+            android:layout_toLeftOf="@+id/imageView"
+            android:gravity="center"
+            android:layout_centerVertical="true" />
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:src="@drawable/robot_expanded"
+            android:layout_gravity="right|top"
+            android:layout_alignParentTop="true"
+            android:layout_alignParentRight="true"
+            android:id="@+id/imageView"
+            android:contentDescription="@string/expanded_image" />
+    </RelativeLayout>
+
+
+</LinearLayout>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw600dp/dimens.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw600dp/dimens.xml
new file mode 100644
index 0000000..eb7d98a
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw600dp/dimens.xml
@@ -0,0 +1,19 @@
+<!--
+  * Copyright (C) 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>
+    <!-- Customize dimensions originally defined in res/values/dimens.xml (such as
+         screen margins) for sw600dp devices (e.g. 7" tablets) here. -->
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw720dp-land/dimens.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw720dp-land/dimens.xml
new file mode 100644
index 0000000..901314a
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw720dp-land/dimens.xml
@@ -0,0 +1,20 @@
+<!--
+  * Copyright (C) 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>
+    <!-- Customize dimensions originally defined in res/values/dimens.xml (such as
+         screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. -->
+    <dimen name="activity_horizontal_margin">128dp</dimen>
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v11/styles.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v11/styles.xml
new file mode 100644
index 0000000..b454dee
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v11/styles.xml
@@ -0,0 +1,26 @@
+<!--
+  * Copyright (C) 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>
+
+    <!--
+        Base application theme for API 11+. This theme completely replaces
+        AppBaseTheme from res/values/styles.xml on API 11+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 11 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v14/styles.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v14/styles.xml
new file mode 100644
index 0000000..1cf1112
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v14/styles.xml
@@ -0,0 +1,27 @@
+<!--
+  * Copyright (C) 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>
+
+    <!--
+        Base application theme for API 14+. This theme completely replaces
+        AppBaseTheme from BOTH res/values/styles.xml and
+        res/values-v11/styles.xml on API 14+ devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
+        <!-- API 14 theme customizations can go here. -->
+    </style>
+
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v9/styles.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v9/styles.xml
new file mode 100644
index 0000000..85010a5
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v9/styles.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <style name="NotificationContent" parent="@android:style/TextAppearance.StatusBar.EventContent">
+    </style>
+
+</resources>
\ No newline at end of file
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/dimens.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..ca1b9e6
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/dimens.xml
@@ -0,0 +1,20 @@
+<!--
+  * Copyright (C) 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>
+    <!-- Default screen margins, per the Android Design guidelines. -->
+    <dimen name="activity_horizontal_margin">16dp</dimen>
+    <dimen name="activity_vertical_margin">16dp</dimen>
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/strings.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/strings.xml
new file mode 100644
index 0000000..3247f39
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/strings.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  * Copyright (C) 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">CustomNotifications</string>
+    <string name="expanded">I\'m the expanded notification.\nCollapse me!</string>
+    <string name="collapsed">I\'m the collapsed notification.\nCreated at: %s</string>
+    <string name="show_notification">Show Notification</string>
+    <string name="custom_notification">I\'m a custom notification.</string>
+
+    <string name="intro_text">This sample demonstrates how a notification is created using the
+        <b>NotificationCompatBuilder</b>
+        with a custom content view. The layout of the notification is defined as a
+        layout resource and inflated as a <b>RemoteViews</b> object.
+        \n\nOn API level 16 and above, a different layout is inflated and set as
+        the <i>big content view</i>, which is used when the notification is expanded.
+        \n\n<b>Use the button below to create the notification.
+        \n\nIf your device is running Jelly Bean or above, try expanding or collapsing
+        the notification to see the different layouts.</b>
+    </string>
+    <string name="collapsed_image">A single Android robot waving. Symbolises a collapsed
+        notification.
+    </string>
+    <string name="expanded_image">Two Androids on top of each other. Symbolises an expanded
+        notification.
+    </string>
+
+</resources>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/styles.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/styles.xml
new file mode 100644
index 0000000..eca4340
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/styles.xml
@@ -0,0 +1,39 @@
+<!--
+  * Copyright (C) 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>
+
+    <!--
+        Base application theme, dependent on API level. This theme is replaced
+        by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
+    -->
+    <style name="AppBaseTheme" parent="android:Theme.Light">
+        <!--
+            Theme customizations available in newer API levels can go in
+            res/values-vXX/styles.xml, while customizations related to
+            backward-compatibility can go here.
+        -->
+    </style>
+
+    <!-- Application theme. -->
+    <style name="AppTheme" parent="AppBaseTheme">
+        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    </style>
+
+    <style name="NotificationContent" parent="@android:style/TextAppearance.Small">
+        <item name="android:textColor">?android:attr/textColorPrimaryInverse</item>
+    </style>
+
+</resources>
diff --git a/ui/notifications/CustomNotifications/build.gradle b/ui/notifications/CustomNotifications/build.gradle
new file mode 100644
index 0000000..5a6276f
--- /dev/null
+++ b/ui/notifications/CustomNotifications/build.gradle
@@ -0,0 +1,13 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.     
+buildscript {
+    repositories {
+        mavenCentral()
+    }
+    dependencies {
+        classpath 'com.android.tools.build:gradle:0.5.+'
+    }
+}
+
+repositories {
+    mavenCentral()
+}
diff --git a/ui/notifications/CustomNotifications/settings.gradle b/ui/notifications/CustomNotifications/settings.gradle
new file mode 100644
index 0000000..f19c616
--- /dev/null
+++ b/ui/notifications/CustomNotifications/settings.gradle
@@ -0,0 +1 @@
+include ':CustomNotifications'