Merge "Initial commit, Advanced immersive mode sample." into developers-dev
diff --git a/.gitignore b/.gitignore
index 552351b..03d41b2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,7 +11,8 @@
 # generated files
 bin/
 out/
-gen/
+src/common
+src/template
 
 # Libraries used by the app
 # Can explicitly add if we want, but shouldn't do so blindly.  Licenses, bloat, etc.
@@ -37,3 +38,4 @@
 .gradle
 build/
 
+
diff --git a/background/alarms/repeatingAlarm/build.gradle b/background/alarms/repeatingAlarm/build.gradle
index dbe554d..88331e3 100644
--- a/background/alarms/repeatingAlarm/build.gradle
+++ b/background/alarms/repeatingAlarm/build.gradle
@@ -1,6 +1,7 @@
 // BEGIN_EXCLUDE
 apply from: "../../../../../build/build.gradle"
 samplegen {
-pathToSamplesCommon "../../../common"
+    pathToBuild "../../../../../build"
+    pathToSamplesCommon "../../../common"
 }
-// END_EXCLUDE
\ No newline at end of file
+// END_EXCLUDE
diff --git a/background/alarms/repeatingAlarm/buildSrc/build.gradle b/background/alarms/repeatingAlarm/buildSrc/build.gradle
index 8c294c2..7cebf71 100644
--- a/background/alarms/repeatingAlarm/buildSrc/build.gradle
+++ b/background/alarms/repeatingAlarm/buildSrc/build.gradle
@@ -8,7 +8,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/background/alarms/repeatingAlarm/repeatingAlarmSample/build.gradle b/background/alarms/repeatingAlarm/repeatingAlarmSample/build.gradle
index 0481875..241bcc7 100644
--- a/background/alarms/repeatingAlarm/repeatingAlarmSample/build.gradle
+++ b/background/alarms/repeatingAlarm/repeatingAlarmSample/build.gradle
@@ -1,3 +1,4 @@
+
 buildscript {
     repositories {
         mavenCentral()
@@ -27,7 +28,6 @@
     compileSdkVersion 18
     buildToolsVersion "18.0.1"
 
-
     sourceSets {
         main {
             dirs.each { dir ->
@@ -35,15 +35,20 @@
                 res.srcDirs "src/${dir}/res"
             }
         }
+        instrumentTest.setRoot('tests')
+        instrumentTest.java.srcDirs = ['tests/src']
     }
 }
 
-task preflight (dependsOn: parent.preflight) {}
-
-// Inject a preflight task into each variant so we have a place to hook tasks
-// that need to run before any of the android build tasks.
-android.applicationVariants.each { variant ->
-    tasks.getByPath("prepare${variant.name.capitalize()}Dependencies").dependsOn preflight
+task preflight (dependsOn: parent.preflight) {
+    project.afterEvaluate {
+        // Inject a preflight task into each variant so we have a place to hook tasks
+        // that need to run before any of the android build tasks.
+        //
+        android.applicationVariants.each { variant ->
+            tasks.getByPath("prepare${variant.name.capitalize()}Dependencies").dependsOn preflight
+        }
+    }
 }
 
 
diff --git a/build.gradle b/build.gradle
index 602c3fd..f511c5e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,46 +1,54 @@
-List<String> samples = [ 
-    "connectivity/bluetooth/BluetoothLeGatt",
+List<String> samples = [
+//    "connectivity/bluetooth/BluetoothLeGatt",
 //    "connectivity/sync/BasicSyncAdapter",
-    "connectivity/network/BasicNetworkDemo",
-    "connectivity/network/NetworkConnect",
-    "content/multiuser/AppRestrictions",
-    "content/contacts/BasicContactables",
+//    "connectivity/network/BasicNetworkDemo",
+//    "connectivity/network/NetworkConnect",
+//    "content/multiuser/AppRestrictions",
+//    "content/contacts/BasicContactables",
     "sampleSamples/BaseSample",
-    "sampleSamples/foo",
     "sampleSamples/singleViewSample",
     "sampleSamples/ActivityCards",
-    "ui/notifications/CustomNotifications",
-    "ui/notifications/BasicNotifications",
+//    "ui/notifications/CustomNotifications",
+//    "ui/notifications/BasicNotifications",
 //    "ui/ImmersiveMode",
-    "ui/actionbarcompat/ListPopupMenu",
-    "ui/actionbarcompat/Styled",
-    "ui/actionbarcompat/ShareActionProvider",
-    "ui/actionbarcompat/Basic",
-    "ui/actionbar/DoneBar",
-    "ui/accessibility/BasicAccessibility",
-    "ui/lists/CustomChoiceList",
-    "ui/views/TextSwitcher",
-    "ui/views/HorizontalPaging",
-    "ui/holo/BorderlessButtons",
-    "security/keystore/BasicAndroidKeyStore",
-    "views/TextLinkify",
+//    "ui/actionbarcompat/ListPopupMenu",
+//    "ui/actionbarcompat/Styled",
+//    "ui/actionbarcompat/ShareActionProvider",
+//    "ui/actionbarcompat/Basic",
+//    "ui/actionbar/DoneBar",
+//    "ui/accessibility/BasicAccessibility",
+//    "ui/lists/CustomChoiceList",
+//    "ui/views/TextSwitcher",
+//    "ui/views/HorizontalPaging",
+//    "ui/holo/BorderlessButtons",
+//    "security/keystore/BasicAndroidKeyStore",
+//    "views/TextLinkify",
 //    "background/alarms/repeatingAlarm",
-    "media/BasicMediaRouter",
+//    "media/BasicMediaRouter",
 //    "media/BasicMediaDecoder",
 //    "media/MediaRecorder",
-    "input/multitouch/BasicMultitouch",
-    "input/gestures/BasicGestureDetect",
+//    "input/multitouch/BasicMultitouch",
+//    "input/gestures/BasicGestureDetect",
 ]
 
-task build {}
+List<String> taskNames = [
+    "refresh",
+    "build",
+    "emitAnt",
+    "emitGradle",
+    "emitBrowseable",
+]
 
-samples.each { sample ->
-    File sampleDir = new File(sample)
-    buildSample = project.task([type: GradleBuild], sample, {
-        buildFile = "${sample}/build.gradle"
-        dir = sample
-        tasks = ["build"]
-    })  
-    build.dependsOn(buildSample)
+taskNames.each { taskName ->
+    def task = project.hasProperty(taskName) ? project.tasks[taskName] : project.task(taskName)
+    println task
+    samples.each { sample ->
+        File sampleDir = new File(sample)
+        task.dependsOn project.task([type: GradleBuild], "${sample}_${taskName}", {
+            buildFile = "${sample}/build.gradle"
+            dir = sample
+            tasks = [taskName]
+        })
+    }
 }
 
diff --git a/common/build/templates/create/_MODULE_/src/main/res/drawable-hdpi/ic_launcher.png b/common/build/templates/create/_MODULE_/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index b1efaf4..0000000
--- a/common/build/templates/create/_MODULE_/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/common/build/templates/create/_MODULE_/src/main/res/drawable-mdpi/ic_launcher.png b/common/build/templates/create/_MODULE_/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index f5f9244..0000000
--- a/common/build/templates/create/_MODULE_/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/common/build/templates/create/_MODULE_/src/main/res/drawable-xhdpi/ic_launcher.png b/common/build/templates/create/_MODULE_/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 5d07b3f..0000000
--- a/common/build/templates/create/_MODULE_/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/common/build/templates/create/_MODULE_/src/main/res/drawable-xxhdpi/ic_launcher.png b/common/build/templates/create/_MODULE_/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 6ef21e1..0000000
--- a/common/build/templates/create/_MODULE_/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/common/src/com/example/android/common/accounts/GenericAccountService.java b/common/src/java/com/example/android/common/accounts/GenericAccountService.java
similarity index 85%
rename from common/src/com/example/android/common/accounts/GenericAccountService.java
rename to common/src/java/com/example/android/common/accounts/GenericAccountService.java
index 9480023..0cd499a 100644
--- a/common/src/com/example/android/common/accounts/GenericAccountService.java
+++ b/common/src/java/com/example/android/common/accounts/GenericAccountService.java
@@ -29,17 +29,23 @@
 
 public class GenericAccountService extends Service {
     private static final String TAG = "GenericAccountService";
-    private static final String ACCOUNT_TYPE = "com.example.android.network.sync.basicsyncadapter";
-    public static final String ACCOUNT_NAME = "sync";
+    public static final String ACCOUNT_NAME = "Account";
     private Authenticator mAuthenticator;
 
     /**
      * Obtain a handle to the {@link android.accounts.Account} used for sync in this application.
      *
+     * <p>It is important that the accountType specified here matches the value in your sync adapter
+     * configuration XML file for android.accounts.AccountAuthenticator (often saved in
+     * res/xml/syncadapter.xml). If this is not set correctly, you'll receive an error indicating
+     * that "caller uid XXXXX is different than the authenticator's uid".
+     *
+     * @param accountType AccountType defined in the configuration XML file for
+     *                    android.accounts.AccountAuthenticator (e.g. res/xml/syncadapter.xml).
      * @return Handle to application's account (not guaranteed to resolve unless CreateSyncAccount()
      *         has been called)
      */
-    public static Account GetAccount() {
+    public static Account GetAccount(String accountType) {
         // Note: Normally the account name is set to the user's identity (username or email
         // address). However, since we aren't actually using any user accounts, it makes more sense
         // to use a generic string in this case.
@@ -47,7 +53,7 @@
         // This string should *not* be localized. If the user switches locale, we would not be
         // able to locate the old account, and may erroneously register multiple accounts.
         final String accountName = ACCOUNT_NAME;
-        return new Account(accountName, ACCOUNT_TYPE);
+        return new Account(accountName, accountType);
     }
 
     @Override
diff --git a/common/src/com/example/android/common/db/SelectionBuilder.java b/common/src/java/com/example/android/common/db/SelectionBuilder.java
similarity index 98%
rename from common/src/com/example/android/common/db/SelectionBuilder.java
rename to common/src/java/com/example/android/common/db/SelectionBuilder.java
index 51d8cc3..a1964c5 100644
--- a/common/src/com/example/android/common/db/SelectionBuilder.java
+++ b/common/src/java/com/example/android/common/db/SelectionBuilder.java
@@ -28,12 +28,10 @@
 import android.text.TextUtils;
 import android.util.Log;
 
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -96,9 +94,9 @@
     private static final String TAG = "basicsyncadapter";
 
     private String mTable = null;
-    private Map<String, String> mProjectionMap = Maps.newHashMap();
+    private Map<String, String> mProjectionMap = new HashMap<String, String>();
     private StringBuilder mSelection = new StringBuilder();
-    private ArrayList<String> mSelectionArgs = Lists.newArrayList();
+    private ArrayList<String> mSelectionArgs = new ArrayList<String>();
 
     /**
      * Reset any internal state, allowing this builder to be recycled.
diff --git a/common/src/com/example/android/common/media/CameraHelper.java b/common/src/java/com/example/android/common/media/CameraHelper.java
similarity index 100%
rename from common/src/com/example/android/common/media/CameraHelper.java
rename to common/src/java/com/example/android/common/media/CameraHelper.java
diff --git a/common/src/com/example/android/common/media/MediaCodecWrapper.java b/common/src/java/com/example/android/common/media/MediaCodecWrapper.java
similarity index 100%
rename from common/src/com/example/android/common/media/MediaCodecWrapper.java
rename to common/src/java/com/example/android/common/media/MediaCodecWrapper.java
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/build.gradle b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/build.gradle
deleted file mode 100644
index 9f4459b..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/build.gradle
+++ /dev/null
@@ -1,6 +0,0 @@
-apply plugin: 'android'
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/AndroidManifest.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/AndroidManifest.xml
deleted file mode 100644
index 019d258..0000000
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?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.bluetooth.le"
-          android:versionCode="1"
-          android:versionName="1.0">
-    <uses-sdk android:minSdkVersion="18"
-              android:targetSdkVersion="18"/>
-    <!-- Declare this required feature if you want to make the app available to BLE-capable
-    devices only.  If you want to make your app available to devices that don't support BLE,
-    you should omit this in the manifest.  Instead, determine BLE capability by using
-    PackageManager.hasSystemFeature(FEATURE_BLUETOOTH_LE) -->
-    <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
-
-    <uses-permission android:name="android.permission.BLUETOOTH"/>
-    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
-
-    <application android:label="@string/app_name"
-                 android:icon="@drawable/ic_launcher"
-                 android:theme="@android:style/Theme.Holo.Light">
-        <activity android:name=".DeviceScanActivity"
-                  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=".DeviceControlActivity"/>
-        <service android:name=".BluetoothLeService" android:enabled="true"/>
-    </application>
-</manifest>
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/.gitignore b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/proguard-project.txt
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/AndroidManifest.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..babd6df
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/AndroidManifest.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.bluetoothlegatt"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <uses-sdk android:minSdkVersion="18"
+        android:targetSdkVersion="18"/>
+    <!-- Declare this required feature if you want to make the app available to BLE-capable
+    devices only.  If you want to make your app available to devices that don't support BLE,
+    you should omit this in the manifest.  Instead, determine BLE capability by using
+    PackageManager.hasSystemFeature(FEATURE_BLUETOOTH_LE) -->
+    <uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
+
+    <uses-permission android:name="android.permission.BLUETOOTH"/>
+    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
+
+    <application android:label="@string/app_name"
+        android:icon="@drawable/ic_launcher"
+        android:theme="@android:style/Theme.Holo.Light">
+        <activity android:name=".DeviceScanActivity"
+            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=".DeviceControlActivity"/>
+        <service android:name=".BluetoothLeService" android:enabled="true"/>
+    </application>
+
+</manifest>
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/BluetoothLeService.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/BluetoothLeService.java
similarity index 99%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/BluetoothLeService.java
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/BluetoothLeService.java
index 9e7aabd..694faaf 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/BluetoothLeService.java
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/BluetoothLeService.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.bluetooth.le;
+package com.example.android.bluetoothlegatt;
 
 import android.app.Service;
 import android.bluetooth.BluetoothAdapter;
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceControlActivity.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceControlActivity.java
similarity index 99%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceControlActivity.java
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceControlActivity.java
index 06b3bb4..dc2f90b 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceControlActivity.java
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceControlActivity.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.bluetooth.le;
+package com.example.android.bluetoothlegatt;
 
 import android.app.Activity;
 import android.bluetooth.BluetoothGattCharacteristic;
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceScanActivity.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceScanActivity.java
similarity index 99%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceScanActivity.java
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceScanActivity.java
index 1cc954d..9b86f7a 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/DeviceScanActivity.java
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/DeviceScanActivity.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.bluetooth.le;
+package com.example.android.bluetoothlegatt;
 
 import android.app.Activity;
 import android.app.ListActivity;
@@ -37,7 +37,6 @@
 import android.widget.Toast;
 
 import java.util.ArrayList;
-import java.util.UUID;
 
 /**
  * Activity for scanning and displaying available Bluetooth LE devices.
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/SampleGattAttributes.java b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/SampleGattAttributes.java
similarity index 96%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/SampleGattAttributes.java
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/SampleGattAttributes.java
index 255653e..e8db74c 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/java/com/example/bluetooth/le/SampleGattAttributes.java
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/java/com/example/android/bluetoothlegatt/SampleGattAttributes.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.bluetooth.le;
+package com.example.android.bluetoothlegatt;
 
 import java.util.HashMap;
 
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-hdpi/ic_launcher.png b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-hdpi/ic_launcher.png
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-mdpi/ic_launcher.png b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-mdpi/ic_launcher.png
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-xhdpi/ic_launcher.png b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-xhdpi/ic_launcher.png
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-xxhdpi/ic_launcher.png b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/actionbar_indeterminate_progress.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/actionbar_indeterminate_progress.xml
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/actionbar_indeterminate_progress.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/actionbar_indeterminate_progress.xml
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/gatt_services_characteristics.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/gatt_services_characteristics.xml
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/gatt_services_characteristics.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/gatt_services_characteristics.xml
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/listitem_device.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/listitem_device.xml
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/layout/listitem_device.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/layout/listitem_device.xml
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/menu/gatt_services.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/menu/gatt_services.xml
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/menu/gatt_services.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/menu/gatt_services.xml
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/menu/main.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/menu/main.xml
similarity index 100%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/menu/main.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/menu/main.xml
diff --git a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/values/strings.xml b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/values/strings.xml
similarity index 96%
rename from connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/values/strings.xml
rename to connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/values/strings.xml
index d828aa0..19f3dce 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGatt/src/main/res/values/strings.xml
+++ b/connectivity/bluetooth/BluetoothLeGatt/BluetoothLeGattSample/src/main/res/values/strings.xml
@@ -14,7 +14,6 @@
      limitations under the License.
 -->
 <resources>
-    <string name="app_name">BLE Sample</string>
     <string name="ble_not_supported">BLE is not supported</string>
     <string name="label_data">Data:</string>
     <string name="label_device_address">Device address:</string>
diff --git a/connectivity/bluetooth/BluetoothLeGatt/build.gradle b/connectivity/bluetooth/BluetoothLeGatt/build.gradle
index 036abc8..ffb5c2f 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/build.gradle
+++ b/connectivity/bluetooth/BluetoothLeGatt/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/connectivity/bluetooth/BluetoothLeGatt/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to connectivity/bluetooth/BluetoothLeGatt/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/connectivity/bluetooth/BluetoothLeGatt/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties b/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties
index 5c22dec..861eddc 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/bluetooth/BluetoothLeGatt/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/connectivity/bluetooth/BluetoothLeGatt/settings.gradle b/connectivity/bluetooth/BluetoothLeGatt/settings.gradle
index 639c5c8..05cae43 100644
--- a/connectivity/bluetooth/BluetoothLeGatt/settings.gradle
+++ b/connectivity/bluetooth/BluetoothLeGatt/settings.gradle
@@ -1 +1,4 @@
-include ':BluetoothLeGatt'
+
+
+
+include 'BluetoothLeGattSample'
diff --git a/connectivity/bluetooth/BluetoothLeGatt/template-params.xml b/connectivity/bluetooth/BluetoothLeGatt/template-params.xml
new file mode 100644
index 0000000..9fa7737
--- /dev/null
+++ b/connectivity/bluetooth/BluetoothLeGatt/template-params.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>BluetoothLeGatt</name>
+    <group>Connectivity</group>
+    <package>com.example.android.bluetoothlegatt</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>18</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample demonstrates how to use the Bluetooth LE Generic Attribute Profile (GATT)
+            to transmit arbitrary data between devices.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+
+</sample>
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/build.gradle b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/build.gradle
deleted file mode 100644
index 10fb811..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/Log.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/Log.java
deleted file mode 100644
index cf4abb7..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/Log.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * 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.common.logger;
-
-/**
- * Helper class for a list (or tree) of LoggerNodes.
- *
- * <p>When this is set as the head of the list,
- * an instance of it can function as a drop-in replacement for {@link android.util.Log}.
- * Most of the methods in this class server only to map a method call in Log to its equivalent
- * in LogNode.</p>
- */
-public class Log {
-    // Grabbing the native values from Android's native logging facilities,
-    // to make for easy migration and interop.
-    public static final int NONE = -1;
-    public static final int VERBOSE = android.util.Log.VERBOSE;
-    public static final int DEBUG = android.util.Log.DEBUG;
-    public static final int INFO = android.util.Log.INFO;
-    public static final int WARN = android.util.Log.WARN;
-    public static final int ERROR = android.util.Log.ERROR;
-    public static final int ASSERT = android.util.Log.ASSERT;
-
-    // Stores the beginning of the LogNode topology.
-    private static LogNode mLogNode;
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public static LogNode getLogNode() {
-        return mLogNode;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to.
-     */
-    public static void setLogNode(LogNode node) {
-        mLogNode = node;
-    }
-
-    /**
-     * Instructs the LogNode to print the log data provided. Other LogNodes can
-     * be chained to the end of the LogNode as desired.
-     *
-     * @param priority Log level of the data being logged. Verbose, Error, etc.
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void println(int priority, String tag, String msg, Throwable tr) {
-        if (mLogNode != null) {
-            mLogNode.println(priority, tag, msg, tr);
-        }
-    }
-
-    /**
-     * Instructs the LogNode to print the log data provided. Other LogNodes can
-     * be chained to the end of the LogNode as desired.
-     *
-     * @param priority Log level of the data being logged. Verbose, Error, etc.
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     */
-    public static void println(int priority, String tag, String msg) {
-        println(priority, tag, msg, null);
-    }
-
-   /**
-     * Prints a message at VERBOSE priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void v(String tag, String msg, Throwable tr) {
-        println(VERBOSE, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at VERBOSE priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void v(String tag, String msg) {
-        v(tag, msg, null);
-    }
-
-
-    /**
-     * Prints a message at DEBUG priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void d(String tag, String msg, Throwable tr) {
-        println(DEBUG, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at DEBUG priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void d(String tag, String msg) {
-        d(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at INFO priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void i(String tag, String msg, Throwable tr) {
-        println(INFO, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at INFO priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void i(String tag, String msg) {
-        i(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void w(String tag, String msg, Throwable tr) {
-        println(WARN, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void w(String tag, String msg) {
-        w(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void w(String tag, Throwable tr) {
-        w(tag, null, tr);
-    }
-
-    /**
-     * Prints a message at ERROR priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void e(String tag, String msg, Throwable tr) {
-        println(ERROR, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at ERROR priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void e(String tag, String msg) {
-        e(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void wtf(String tag, String msg, Throwable tr) {
-        println(ASSERT, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void wtf(String tag, String msg) {
-        wtf(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void wtf(String tag, Throwable tr) {
-        wtf(tag, null, tr);
-    }
-}
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogNode.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogNode.java
deleted file mode 100644
index bc37cab..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogNode.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2012 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.common.logger;
-
-/**
- * Basic interface for a logging system that can output to one or more targets.
- * Note that in addition to classes that will output these logs in some format,
- * one can also implement this interface over a filter and insert that in the chain,
- * such that no targets further down see certain data, or see manipulated forms of the data.
- * You could, for instance, write a "ToHtmlLoggerNode" that just converted all the log data
- * it received to HTML and sent it along to the next node in the chain, without printing it
- * anywhere.
- */
-public interface LogNode {
-
-    /**
-     * Instructs first LogNode in the list to print the log data provided.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public void println(int priority, String tag, String msg, Throwable tr);
-
-}
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogView.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogView.java
deleted file mode 100644
index 953b8b1..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogView.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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.common.logger;
-
-import android.content.Context;
-import android.util.*;
-import android.widget.TextView;
-
-/** Simple TextView which is used to output log data received through the LogNode interface.
-*/
-public class LogView extends TextView implements LogNode {
-
-    public LogView(Context context) {
-        super(context);
-    }
-
-    public LogView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public LogView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-    }
-
-    /**
-     * Formats the log data and prints it out to the LogView.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        String priorityStr = null;
-
-        // For the purposes of this View, we want to print the priority as readable text.
-        switch(priority) {
-            case android.util.Log.VERBOSE:
-                priorityStr = "VERBOSE";
-                break;
-            case android.util.Log.DEBUG:
-                priorityStr = "DEBUG";
-                break;
-            case android.util.Log.INFO:
-                priorityStr = "INFO";
-                break;
-            case android.util.Log.WARN:
-                priorityStr = "WARN";
-                break;
-            case android.util.Log.ERROR:
-                priorityStr = "ERROR";
-                break;
-            case android.util.Log.ASSERT:
-                priorityStr = "ASSERT";
-                break;
-            default:
-                break;
-        }
-
-        // Handily, the Log class has a facility for converting a stack trace into a usable string.
-        String exceptionStr = null;
-        if (tr != null) {
-            exceptionStr = android.util.Log.getStackTraceString(tr);
-        }
-
-        // Take the priority, tag, message, and exception, and concatenate as necessary
-        // into one usable line of text.
-        StringBuilder outputBuilder = new StringBuilder();
-
-        String delimiter = "\t";
-        appendIfNotNull(outputBuilder, priorityStr, delimiter);
-        appendIfNotNull(outputBuilder, tag, delimiter);
-        appendIfNotNull(outputBuilder, msg, delimiter);
-        appendIfNotNull(outputBuilder, exceptionStr, delimiter);
-
-        // Actually display the text we just generated within the LogView.
-        appendToLog(outputBuilder.toString());
-
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /** Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since
-     * the logger takes so many arguments that might be null, this method helps cut out some of the
-     * agonizing tedium of writing the same 3 lines over and over.
-     * @param source StringBuilder containing the text to append to.
-     * @param addStr The String to append
-     * @param delimiter The String to separate the source and appended strings. A tab or comma,
-     *                  for instance.
-     * @return The fully concatenated String as a StringBuilder
-     */
-    private StringBuilder appendIfNotNull(StringBuilder source, String addStr, String delimiter) {
-        if (addStr != null) {
-            if (addStr.length() == 0) {
-                delimiter = "";
-            }
-
-            return source.append(addStr).append(delimiter);
-        }
-        return source;
-    }
-
-    // The next LogNode in the chain.
-    LogNode mNext;
-
-    /** Outputs the string as a new line of log data in the LogView. */
-    public void appendToLog(String s) {
-        append("\n" + s);
-    }
-}
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogWrapper.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogWrapper.java
deleted file mode 100644
index ea8e20e..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/LogWrapper.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2012 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.common.logger;
-
-import android.util.Log;
-
-/**
- * Helper class which wraps Android's native Log utility in the Logger interface.  This way
- * normal DDMS output can be one of the many targets receiving and outputting logs simultaneously.
- */
-public class LogWrapper implements LogNode {
-
-    // For piping:  The next node to receive Log data after this one has done its work.
-    private LogNode mNext;
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to..
-     */
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /**
-     * Prints data out to the console using Android's native log mechanism.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        // There actually are log methods that don't take a msg parameter.  For now,
-        // if that's the case, just convert null to the empty string and move on.
-        String useMsg = msg;
-        if (useMsg == null) {
-            useMsg = "";
-        }
-
-        // If an exeption was provided, convert that exception to a usable string and attach
-        // it to the end of the msg method.
-        if (tr != null) {
-            msg += "\n" + Log.getStackTraceString(tr);
-        }
-
-        // This is functionally identical to Log.x(tag, useMsg);
-        // For instance, if priority were Log.VERBOSE, this would be the same as Log.v(tag, useMsg)
-        Log.println(priority, tag, useMsg);
-
-        // If this isn't the last node in the chain, move things along.
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-}
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
deleted file mode 100644
index c57a111..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.common.logger;
-
-/**
- * Simple {@link LogNode} filter, removes everything except the message.
- * Useful for situations like on-screen log output where you don't want a lot of metadata displayed,
- * just easy-to-read message updates as they're happening.
- */
-public class MessageOnlyLogFilter implements LogNode {
-
-    LogNode mNext;
-
-    /**
-     * Takes the "next" LogNode as a parameter, to simplify chaining.
-     *
-     * @param next The next LogNode in the pipeline.
-     */
-    public MessageOnlyLogFilter(LogNode next) {
-        mNext = next;
-    }
-
-    public MessageOnlyLogFilter() {
-    }
-
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        if (mNext != null) {
-            getNext().println(Log.NONE, null, msg, null);
-        }
-    }
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to..
-     */
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-}
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/LogFragment.java b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/LogFragment.java
deleted file mode 100644
index ecbe2eb..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/LogFragment.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.example.android.networkbasic;
-
-import android.support.v4.app.Fragment;
-
-import com.example.android.networkbasic.R;
-import com.example.android.common.logger.LogView;
-
-import android.os.Bundle;
-
-import android.text.Editable;
-import android.text.TextWatcher;
-
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ScrollView;
-
-/**
- * Simple fragment that contains a LogView and uses it to output log data it receives
- * through the LogNode interface.
- */
-public class LogFragment extends Fragment {
-
-  private LogView mLogView;
-
-  public LogFragment() {}
-
-  @Override
-  public View onCreateView(LayoutInflater inflater, ViewGroup container,
-          Bundle savedInstanceState) {
-
-      View result = inflater.inflate(R.layout.log_fragment, container, false);
-
-      mLogView = (LogView) result.findViewById(R.id.sample_output);
-
-      // Wire up so when the text changes, the view scrolls down.
-      final ScrollView scrollView =
-              ((ScrollView) result.findViewById(R.id.log_scroll));
-
-      mLogView.addTextChangedListener(new TextWatcher() {
-          @Override
-          public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
-
-          @Override
-          public void onTextChanged(CharSequence s, int start, int before, int count) {}
-
-          @Override
-          public void afterTextChanged(Editable s) {
-              scrollView.fullScroll(ScrollView.FOCUS_DOWN);
-          }
-      });
-
-      return result;
-  }
-
-  public LogView getLogView() {
-      return mLogView;
-  }
-
-}
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/activity_main.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/activity_main.xml
deleted file mode 100755
index d9be686..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  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:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
-    <fragment
-        android:name="com.example.android.common.SimpleTextFragment"
-        android:id="@+id/intro_fragment"
-        android:layout_weight="1"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-    <View
-        android:layout_width="fill_parent"
-        android:layout_height="1dp"
-        android:background="@android:color/darker_gray"/>
-    <fragment
-        android:name="com.example.android.networkbasic.LogFragment"
-        android:id="@+id/log_fragment"
-        android:layout_weight="1"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-</LinearLayout>
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/log_fragment.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/log_fragment.xml
deleted file mode 100644
index 6d79548..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/layout/log_fragment.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  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:id="@+id/log_scroll"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <com.example.android.common.logger.LogView
-        android:id="@+id/sample_output"
-        style="@style/Log"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:clickable="true"
-        android:focusable="true"
-        android:text=""
-        android:gravity="bottom" />
-</ScrollView>
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values-sw600dp/styles.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values-sw600dp/styles.xml
deleted file mode 100644
index ffcbe8a..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values-sw600dp/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-  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.SampleOutput">
-        <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>
-        <item name="android:textAppearance">?android:textAppearanceLarge</item>
-        <item name="android:lineSpacingMultiplier">1.2</item>
-    </style>
-
-</resources>
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values-v11/styles.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values-v11/styles.xml
deleted file mode 100644
index c6c648b..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--
-  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="Theme.Base" parent="android:Theme.Holo.Light" />
-</resources>
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/dimens.xml b/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/dimens.xml
deleted file mode 100644
index 4f69897..0000000
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  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_medium">16dp</dimen>
-    <dimen name="margin_huge">64dp</dimen>
-
-</resources>
diff --git a/connectivity/network/BasicNetworkDemo/README.txt b/connectivity/network/BasicNetworkDemo/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/connectivity/network/BasicNetworkDemo/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworkDemo/build.gradle b/connectivity/network/BasicNetworkDemo/build.gradle
deleted file mode 100644
index 036abc8..0000000
--- a/connectivity/network/BasicNetworkDemo/build.gradle
+++ /dev/null
@@ -1,8 +0,0 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
-}
diff --git a/connectivity/network/BasicNetworkDemo/settings.gradle b/connectivity/network/BasicNetworkDemo/settings.gradle
deleted file mode 100644
index 4981654..0000000
--- a/connectivity/network/BasicNetworkDemo/settings.gradle
+++ /dev/null
@@ -1 +0,0 @@
-include ':BasicNetworkDemo'
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/.gitignore b/connectivity/network/BasicNetworking/BasicNetworkingSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/connectivity/network/BasicNetworking/BasicNetworkingSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/connectivity/network/BasicNetworking/BasicNetworkingSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to connectivity/network/BasicNetworking/BasicNetworkingSample/proguard-project.txt
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/AndroidManifest.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/AndroidManifest.xml
old mode 100755
new mode 100644
similarity index 92%
rename from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/AndroidManifest.xml
rename to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/AndroidManifest.xml
index c0d3e64..48bfeac
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/AndroidManifest.xml
+++ b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/AndroidManifest.xml
@@ -16,7 +16,7 @@
 
 <manifest
     xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.networkbasic"
+    package="com.example.android.basicnetworking"
     android:versionCode="1"
     android:versionName="1.0">
 
@@ -31,7 +31,7 @@
         android:allowBackup="true">
 
         <activity
-            android:name="com.example.android.networkbasic.MainActivity"
+            android:name="com.example.android.basicnetworking.MainActivity"
             android:label="@string/app_name"
             android:uiOptions="splitActionBarWhenNarrow">
 
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/MainActivity.java b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/MainActivity.java
similarity index 96%
rename from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/MainActivity.java
rename to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/MainActivity.java
index c2a4305..39ed4b1 100755
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/networkbasic/MainActivity.java
+++ b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/MainActivity.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.networkbasic;
+package com.example.android.basicnetworking;
 
 import android.content.Context;
 import android.net.ConnectivityManager;
@@ -25,8 +25,8 @@
 import android.view.Menu;
 import android.view.MenuItem;
 
-import com.example.android.common.SimpleTextFragment;
 import com.example.android.common.logger.Log;
+import com.example.android.common.logger.LogFragment;
 import com.example.android.common.logger.LogWrapper;
 import com.example.android.common.logger.MessageOnlyLogFilter;
 
@@ -53,7 +53,7 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
 
         // Initialize text fragment that displays intro text.
         SimpleTextFragment introFragment = (SimpleTextFragment)
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/SimpleTextFragment.java b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/SimpleTextFragment.java
similarity index 98%
copy from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/SimpleTextFragment.java
copy to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/SimpleTextFragment.java
index a2be93f..c6d409c 100644
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/SimpleTextFragment.java
+++ b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/java/com/example/android/basicnetworking/SimpleTextFragment.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.common;
+package com.example.android.basicnetworking;
 
 import android.os.Bundle;
 
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-hdpi/ic_launcher.png b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-hdpi/ic_launcher.png
rename to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-mdpi/ic_launcher.png b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-mdpi/ic_launcher.png
rename to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-xhdpi/ic_launcher.png b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-xhdpi/ic_launcher.png
rename to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-xxhdpi/ic_launcher.png b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/activity_main.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/layout/sample_main.xml
similarity index 90%
rename from connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/activity_main.xml
rename to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/layout/sample_main.xml
index f21b1ac..ccbe6ae 100755
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/activity_main.xml
+++ b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/layout/sample_main.xml
@@ -22,7 +22,7 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">
     <fragment
-        android:name="com.example.android.common.SimpleTextFragment"
+        android:name="com.example.android.basicnetworking.SimpleTextFragment"
         android:id="@+id/intro_fragment"
         android:layout_weight="1"
         android:layout_width="match_parent"
@@ -32,7 +32,7 @@
         android:layout_height="1dp"
         android:background="@android:color/darker_gray"/>
     <fragment
-        android:name="com.example.android.networkconnect.LogFragment"
+        android:name="com.example.android.common.logger.LogFragment"
         android:id="@+id/log_fragment"
         android:layout_weight="1"
         android:layout_width="match_parent"
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/menu/main.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/menu/main.xml
similarity index 100%
rename from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/menu/main.xml
rename to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/menu/main.xml
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/strings.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/strings.xml
similarity index 79%
rename from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/strings.xml
rename to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/strings.xml
index d8116aa..d39460a 100755
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/strings.xml
+++ b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/strings.xml
@@ -15,12 +15,6 @@
   -->
 
 <resources>
-    <string name="app_name">Basic Network Demo</string>
-
-    <string name="intro_message">Welcome to Basic Network Demo!
-        Click TEST to find out whether your device has a network connection, and if so, what type it is.
-    </string>
-
     <string name="test_text">Test</string>
     <string name="clear_text">Clear</string>
     <string name="wifi_connection">The active connection is wifi.</string>
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/styles.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/styles.xml
similarity index 85%
rename from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/styles.xml
rename to connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/styles.xml
index 4d9bb98..3450a54 100644
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/res/values/styles.xml
+++ b/connectivity/network/BasicNetworking/BasicNetworkingSample/src/main/res/values/styles.xml
@@ -16,16 +16,8 @@
 
 <resources>
 
-    <!-- Activity themes -->
-
-    <style name="Theme.Base" parent="android:Theme.Light" />
-
-    <style name="Theme.Sample" parent="Theme.Base" />
-
     <!-- Widget styling -->
 
-    <style name="Widget" />
-
     <style name="Widget.SampleOutput">
         <item name="android:padding">@dimen/margin_medium</item>
         <item name="android:textAppearance">?android:textAppearanceMedium</item>
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/AndroidManifest.xml b/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/src/com/example/android/basicnetworking/tests/SampleTests.java b/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/src/com/example/android/basicnetworking/tests/SampleTests.java
new file mode 100644
index 0000000..0cf077e
--- /dev/null
+++ b/connectivity/network/BasicNetworking/BasicNetworkingSample/tests/src/com/example/android/basicnetworking/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.basicnetworking.tests;
+
+import com.example.android.basicnetworking.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for BasicNetworking sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private BasicNetworkingFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (BasicNetworkingFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/connectivity/network/BasicNetworking/build.gradle b/connectivity/network/BasicNetworking/build.gradle
new file mode 100644
index 0000000..ffb5c2f
--- /dev/null
+++ b/connectivity/network/BasicNetworking/build.gradle
@@ -0,0 +1,11 @@
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
+}
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/connectivity/network/BasicNetworking/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to connectivity/network/BasicNetworking/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/connectivity/network/BasicNetworking/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.jar b/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.jar
rename to connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties b/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties
similarity index 80%
rename from connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
rename to connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/network/BasicNetworking/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/connectivity/network/BasicNetworkDemo/gradlew b/connectivity/network/BasicNetworking/gradlew
similarity index 100%
rename from connectivity/network/BasicNetworkDemo/gradlew
rename to connectivity/network/BasicNetworking/gradlew
diff --git a/connectivity/network/BasicNetworkDemo/gradlew.bat b/connectivity/network/BasicNetworking/gradlew.bat
similarity index 100%
rename from connectivity/network/BasicNetworkDemo/gradlew.bat
rename to connectivity/network/BasicNetworking/gradlew.bat
diff --git a/connectivity/network/BasicNetworking/settings.gradle b/connectivity/network/BasicNetworking/settings.gradle
new file mode 100644
index 0000000..453e7cd
--- /dev/null
+++ b/connectivity/network/BasicNetworking/settings.gradle
@@ -0,0 +1,4 @@
+
+
+
+include 'BasicNetworkingSample'
diff --git a/connectivity/network/BasicNetworking/template-params.xml b/connectivity/network/BasicNetworking/template-params.xml
new file mode 100644
index 0000000..7ba0747
--- /dev/null
+++ b/connectivity/network/BasicNetworking/template-params.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>BasicNetworking</name>
+    <group>NoGroup</group>
+    <package>com.example.android.basicnetworking</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>4</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+                This sample demonstrates how to use the ConnectivityManager to determine if you have
+                a network connection, and if so, what type of connection it is.
+                \n\nA "NetworkInfo" object is retrieved from the ConnectivityManager, which contains information
+                on the active connection, and then the connection type is printed to an on-screen console.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/build.gradle b/connectivity/network/NetworkConnect/NetworkConnect/build.gradle
deleted file mode 100644
index 4c38ffd..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/build.gradle
+++ /dev/null
@@ -1,20 +0,0 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
-}
-
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/SimpleTextFragment.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/SimpleTextFragment.java
deleted file mode 100644
index a2be93f..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/SimpleTextFragment.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * 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.common;
-
-import android.os.Bundle;
-
-import android.support.v4.app.Fragment;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-/**
- * Simple fragment containing only a TextView. Used by TextPagerAdapter to create
- * tutorial-style pages for apps.
- */
-public class SimpleTextFragment extends Fragment {
-
-    // Contains the text that will be displayed by this Fragment
-    String mText;
-
-    // Contains a resource ID for the text that will be displayed by this fragment.
-    int mTextId = -1;
-
-    // Keys which will be used to store/retrieve text passed in via setArguments.
-    public static final String TEXT_KEY = "text";
-    public static final String TEXT_ID_KEY = "text_id";
-
-    // For situations where the app wants to modify text at Runtime, exposing the TextView.
-    private TextView mTextView;
-
-    public SimpleTextFragment() {
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-        // Before initializing the textView, check if any arguments were provided via setArguments.
-        processArguments();
-
-        // Create a new TextView and set its text to whatever was provided.
-        mTextView = new TextView(getActivity());
-        mTextView.setGravity(Gravity.CENTER);
-
-        if (mText != null) {
-            mTextView.setText(mText);
-            Log.i("SimpleTextFragment", mText);
-        }
-        return mTextView;
-    }
-
-    public TextView getTextView() {
-        return mTextView;
-    }
-
-    /**
-     * Changes the text for this TextView, according to the resource ID provided.
-     * @param stringId A resource ID representing the text content for this Fragment's TextView.
-     */
-    public void setText(int stringId) {
-        getTextView().setText(getActivity().getString(stringId));
-    }
-
-    /**
-     * Processes the arguments passed into this Fragment via setArguments method.
-     * Currently the method only looks for text or a textID, nothing else.
-     */
-    public void processArguments() {
-        // For most objects we'd handle the multiple possibilities for initialization variables
-        // as multiple constructors.  For Fragments, however, it's customary to use
-        // setArguments / getArguments.
-        if (getArguments() != null) {
-            Bundle args = getArguments();
-            if (args.containsKey(TEXT_KEY)) {
-                mText = args.getString(TEXT_KEY);
-                Log.d("Constructor", "Added Text.");
-            } else if (args.containsKey(TEXT_ID_KEY)) {
-                mTextId = args.getInt(TEXT_ID_KEY);
-                mText = getString(mTextId);
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/Log.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/Log.java
deleted file mode 100644
index cf4abb7..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/Log.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * 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.common.logger;
-
-/**
- * Helper class for a list (or tree) of LoggerNodes.
- *
- * <p>When this is set as the head of the list,
- * an instance of it can function as a drop-in replacement for {@link android.util.Log}.
- * Most of the methods in this class server only to map a method call in Log to its equivalent
- * in LogNode.</p>
- */
-public class Log {
-    // Grabbing the native values from Android's native logging facilities,
-    // to make for easy migration and interop.
-    public static final int NONE = -1;
-    public static final int VERBOSE = android.util.Log.VERBOSE;
-    public static final int DEBUG = android.util.Log.DEBUG;
-    public static final int INFO = android.util.Log.INFO;
-    public static final int WARN = android.util.Log.WARN;
-    public static final int ERROR = android.util.Log.ERROR;
-    public static final int ASSERT = android.util.Log.ASSERT;
-
-    // Stores the beginning of the LogNode topology.
-    private static LogNode mLogNode;
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public static LogNode getLogNode() {
-        return mLogNode;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to.
-     */
-    public static void setLogNode(LogNode node) {
-        mLogNode = node;
-    }
-
-    /**
-     * Instructs the LogNode to print the log data provided. Other LogNodes can
-     * be chained to the end of the LogNode as desired.
-     *
-     * @param priority Log level of the data being logged. Verbose, Error, etc.
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void println(int priority, String tag, String msg, Throwable tr) {
-        if (mLogNode != null) {
-            mLogNode.println(priority, tag, msg, tr);
-        }
-    }
-
-    /**
-     * Instructs the LogNode to print the log data provided. Other LogNodes can
-     * be chained to the end of the LogNode as desired.
-     *
-     * @param priority Log level of the data being logged. Verbose, Error, etc.
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     */
-    public static void println(int priority, String tag, String msg) {
-        println(priority, tag, msg, null);
-    }
-
-   /**
-     * Prints a message at VERBOSE priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void v(String tag, String msg, Throwable tr) {
-        println(VERBOSE, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at VERBOSE priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void v(String tag, String msg) {
-        v(tag, msg, null);
-    }
-
-
-    /**
-     * Prints a message at DEBUG priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void d(String tag, String msg, Throwable tr) {
-        println(DEBUG, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at DEBUG priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void d(String tag, String msg) {
-        d(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at INFO priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void i(String tag, String msg, Throwable tr) {
-        println(INFO, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at INFO priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void i(String tag, String msg) {
-        i(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void w(String tag, String msg, Throwable tr) {
-        println(WARN, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void w(String tag, String msg) {
-        w(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void w(String tag, Throwable tr) {
-        w(tag, null, tr);
-    }
-
-    /**
-     * Prints a message at ERROR priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void e(String tag, String msg, Throwable tr) {
-        println(ERROR, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at ERROR priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void e(String tag, String msg) {
-        e(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void wtf(String tag, String msg, Throwable tr) {
-        println(ASSERT, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void wtf(String tag, String msg) {
-        wtf(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void wtf(String tag, Throwable tr) {
-        wtf(tag, null, tr);
-    }
-}
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogNode.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogNode.java
deleted file mode 100644
index bc37cab..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogNode.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2012 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.common.logger;
-
-/**
- * Basic interface for a logging system that can output to one or more targets.
- * Note that in addition to classes that will output these logs in some format,
- * one can also implement this interface over a filter and insert that in the chain,
- * such that no targets further down see certain data, or see manipulated forms of the data.
- * You could, for instance, write a "ToHtmlLoggerNode" that just converted all the log data
- * it received to HTML and sent it along to the next node in the chain, without printing it
- * anywhere.
- */
-public interface LogNode {
-
-    /**
-     * Instructs first LogNode in the list to print the log data provided.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public void println(int priority, String tag, String msg, Throwable tr);
-
-}
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogView.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogView.java
deleted file mode 100644
index 953b8b1..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogView.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * 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.common.logger;
-
-import android.content.Context;
-import android.util.*;
-import android.widget.TextView;
-
-/** Simple TextView which is used to output log data received through the LogNode interface.
-*/
-public class LogView extends TextView implements LogNode {
-
-    public LogView(Context context) {
-        super(context);
-    }
-
-    public LogView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public LogView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-    }
-
-    /**
-     * Formats the log data and prints it out to the LogView.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        String priorityStr = null;
-
-        // For the purposes of this View, we want to print the priority as readable text.
-        switch(priority) {
-            case android.util.Log.VERBOSE:
-                priorityStr = "VERBOSE";
-                break;
-            case android.util.Log.DEBUG:
-                priorityStr = "DEBUG";
-                break;
-            case android.util.Log.INFO:
-                priorityStr = "INFO";
-                break;
-            case android.util.Log.WARN:
-                priorityStr = "WARN";
-                break;
-            case android.util.Log.ERROR:
-                priorityStr = "ERROR";
-                break;
-            case android.util.Log.ASSERT:
-                priorityStr = "ASSERT";
-                break;
-            default:
-                break;
-        }
-
-        // Handily, the Log class has a facility for converting a stack trace into a usable string.
-        String exceptionStr = null;
-        if (tr != null) {
-            exceptionStr = android.util.Log.getStackTraceString(tr);
-        }
-
-        // Take the priority, tag, message, and exception, and concatenate as necessary
-        // into one usable line of text.
-        StringBuilder outputBuilder = new StringBuilder();
-
-        String delimiter = "\t";
-        appendIfNotNull(outputBuilder, priorityStr, delimiter);
-        appendIfNotNull(outputBuilder, tag, delimiter);
-        appendIfNotNull(outputBuilder, msg, delimiter);
-        appendIfNotNull(outputBuilder, exceptionStr, delimiter);
-
-        // Actually display the text we just generated within the LogView.
-        appendToLog(outputBuilder.toString());
-
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /** Takes a string and adds to it, with a separator, if the bit to be added isn't null. Since
-     * the logger takes so many arguments that might be null, this method helps cut out some of the
-     * agonizing tedium of writing the same 3 lines over and over.
-     * @param source StringBuilder containing the text to append to.
-     * @param addStr The String to append
-     * @param delimiter The String to separate the source and appended strings. A tab or comma,
-     *                  for instance.
-     * @return The fully concatenated String as a StringBuilder
-     */
-    private StringBuilder appendIfNotNull(StringBuilder source, String addStr, String delimiter) {
-        if (addStr != null) {
-            if (addStr.length() == 0) {
-                delimiter = "";
-            }
-
-            return source.append(addStr).append(delimiter);
-        }
-        return source;
-    }
-
-    // The next LogNode in the chain.
-    LogNode mNext;
-
-    /** Outputs the string as a new line of log data in the LogView. */
-    public void appendToLog(String s) {
-        append("\n" + s);
-    }
-}
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogWrapper.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogWrapper.java
deleted file mode 100644
index ea8e20e..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/LogWrapper.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2012 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.common.logger;
-
-import android.util.Log;
-
-/**
- * Helper class which wraps Android's native Log utility in the Logger interface.  This way
- * normal DDMS output can be one of the many targets receiving and outputting logs simultaneously.
- */
-public class LogWrapper implements LogNode {
-
-    // For piping:  The next node to receive Log data after this one has done its work.
-    private LogNode mNext;
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to..
-     */
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /**
-     * Prints data out to the console using Android's native log mechanism.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        // There actually are log methods that don't take a msg parameter.  For now,
-        // if that's the case, just convert null to the empty string and move on.
-        String useMsg = msg;
-        if (useMsg == null) {
-            useMsg = "";
-        }
-
-        // If an exeption was provided, convert that exception to a usable string and attach
-        // it to the end of the msg method.
-        if (tr != null) {
-            msg += "\n" + Log.getStackTraceString(tr);
-        }
-
-        // This is functionally identical to Log.x(tag, useMsg);
-        // For instance, if priority were Log.VERBOSE, this would be the same as Log.v(tag, useMsg)
-        Log.println(priority, tag, useMsg);
-
-        // If this isn't the last node in the chain, move things along.
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-}
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
deleted file mode 100644
index c57a111..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.common.logger;
-
-/**
- * Simple {@link LogNode} filter, removes everything except the message.
- * Useful for situations like on-screen log output where you don't want a lot of metadata displayed,
- * just easy-to-read message updates as they're happening.
- */
-public class MessageOnlyLogFilter implements LogNode {
-
-    LogNode mNext;
-
-    /**
-     * Takes the "next" LogNode as a parameter, to simplify chaining.
-     *
-     * @param next The next LogNode in the pipeline.
-     */
-    public MessageOnlyLogFilter(LogNode next) {
-        mNext = next;
-    }
-
-    public MessageOnlyLogFilter() {
-    }
-
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        if (mNext != null) {
-            getNext().println(Log.NONE, null, msg, null);
-        }
-    }
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to..
-     */
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-}
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/LogFragment.java b/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/LogFragment.java
deleted file mode 100644
index 655d428..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/LogFragment.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package com.example.android.networkconnect;
-
-import android.support.v4.app.Fragment;
-
-import com.example.android.networkconnect.R;
-import com.example.android.common.logger.LogView;
-
-import android.os.Bundle;
-
-import android.text.Editable;
-import android.text.TextWatcher;
-
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ScrollView;
-
-/**
- * Simple fragment that contains a LogView and uses it to output log data it receives
- * through the LogNode interface.
- */
-public class LogFragment extends Fragment {
-
-  private LogView mLogView;
-
-  public LogFragment() {}
-
-  @Override
-  public View onCreateView(LayoutInflater inflater, ViewGroup container,
-          Bundle savedInstanceState) {
-
-      View result = inflater.inflate(R.layout.log_fragment, container, false);
-
-      mLogView = (LogView) result.findViewById(R.id.sample_output);
-
-      // Wire up so when the text changes, the view scrolls down.
-      final ScrollView scrollView =
-              ((ScrollView) result.findViewById(R.id.log_scroll));
-
-      mLogView.addTextChangedListener(new TextWatcher() {
-          @Override
-          public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
-
-          @Override
-          public void onTextChanged(CharSequence s, int start, int before, int count) {}
-
-          @Override
-          public void afterTextChanged(Editable s) {
-              scrollView.fullScroll(ScrollView.FOCUS_DOWN);
-          }
-      });
-
-      return result;
-  }
-
-  public LogView getLogView() {
-      return mLogView;
-  }
-
-}
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/log_fragment.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/log_fragment.xml
deleted file mode 100644
index 6d79548..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/log_fragment.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  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:id="@+id/log_scroll"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <com.example.android.common.logger.LogView
-        android:id="@+id/sample_output"
-        style="@style/Log"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:clickable="true"
-        android:focusable="true"
-        android:text=""
-        android:gravity="bottom" />
-</ScrollView>
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values-sw600dp/styles.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values-sw600dp/styles.xml
deleted file mode 100644
index ffcbe8a..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values-sw600dp/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-  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.SampleOutput">
-        <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>
-        <item name="android:textAppearance">?android:textAppearanceLarge</item>
-        <item name="android:lineSpacingMultiplier">1.2</item>
-    </style>
-
-</resources>
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values-v11/styles.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values-v11/styles.xml
deleted file mode 100644
index c6c648b..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--
-  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="Theme.Base" parent="android:Theme.Holo.Light" />
-</resources>
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/dimens.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/dimens.xml
deleted file mode 100644
index 4f69897..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  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_medium">16dp</dimen>
-    <dimen name="margin_huge">64dp</dimen>
-
-</resources>
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/styles.xml b/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/styles.xml
deleted file mode 100644
index 4d9bb98..0000000
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
-  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 thegi 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.Light" />
-
-    <style name="Theme.Sample" parent="Theme.Base" />
-
-    <!-- Widget styling -->
-
-    <style name="Widget" />
-
-    <style name="Widget.SampleOutput">
-        <item name="android:padding">@dimen/margin_medium</item>
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-    <style name="Log" parent="Widget.SampleOutput">
-        <item name="android:typeface">monospace</item>
-    </style>
-
-
-</resources>
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/.gitignore b/connectivity/network/NetworkConnect/NetworkConnectSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnectSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/connectivity/network/NetworkConnect/NetworkConnectSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to connectivity/network/NetworkConnect/NetworkConnectSample/proguard-project.txt
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/AndroidManifest.xml b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/AndroidManifest.xml
old mode 100755
new mode 100644
similarity index 62%
rename from connectivity/network/NetworkConnect/NetworkConnect/src/main/AndroidManifest.xml
rename to connectivity/network/NetworkConnect/NetworkConnectSample/src/main/AndroidManifest.xml
index 09fd2ee..1ae29df
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/AndroidManifest.xml
+++ b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/AndroidManifest.xml
@@ -1,18 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright 2013 The Android Open Source Project
+ 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
+ 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
+     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.
-  -->
+ 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"
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/MainActivity.java b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/MainActivity.java
similarity index 95%
rename from connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/MainActivity.java
rename to connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/MainActivity.java
index ae1591d..3ad4646 100755
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/java/com/example/android/networkconnect/MainActivity.java
+++ b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/MainActivity.java
@@ -23,8 +23,8 @@
 import android.view.Menu;
 import android.view.MenuItem;
 
-import com.example.android.common.SimpleTextFragment;
 import com.example.android.common.logger.Log;
+import com.example.android.common.logger.LogFragment;
 import com.example.android.common.logger.LogWrapper;
 import com.example.android.common.logger.MessageOnlyLogFilter;
 
@@ -55,12 +55,12 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
 
         // Initialize text fragment that displays intro text.
         SimpleTextFragment introFragment = (SimpleTextFragment)
                     getSupportFragmentManager().findFragmentById(R.id.intro_fragment);
-        introFragment.setText(R.string.intro_message);
+        introFragment.setText(R.string.welcome_message);
         introFragment.getTextView().setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16.0f);
 
         // Initialize the logging framework.
@@ -135,7 +135,7 @@
      * an input stream.
      * @param urlString A string representation of a URL.
      * @return An InputStream retrieved from a successful HttpURLConnection.
-     * @throws IOException
+     * @throws java.io.IOException
      */
     private InputStream downloadUrl(String urlString) throws IOException {
         // BEGIN_INCLUDE(get_inputstream)
@@ -156,8 +156,8 @@
      * @param stream InputStream containing HTML from targeted site.
      * @param len Length of string that this method returns.
      * @return String concatenated according to len parameter.
-     * @throws IOException
-     * @throws UnsupportedEncodingException
+     * @throws java.io.IOException
+     * @throws java.io.UnsupportedEncodingException
      */
     private String readIt(InputStream stream, int len) throws IOException, UnsupportedEncodingException {
         Reader reader = null;
diff --git a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/SimpleTextFragment.java b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/SimpleTextFragment.java
similarity index 98%
rename from connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/SimpleTextFragment.java
rename to connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/SimpleTextFragment.java
index a2be93f..3202937 100644
--- a/connectivity/network/BasicNetworkDemo/BasicNetworkDemo/src/main/java/com/example/android/common/SimpleTextFragment.java
+++ b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/java/com/example/android/networkconnect/SimpleTextFragment.java
@@ -14,10 +14,9 @@
  * limitations under the License.
  */
 
-package com.example.android.common;
+package com.example.android.networkconnect;
 
 import android.os.Bundle;
-
 import android.support.v4.app.Fragment;
 import android.util.Log;
 import android.view.Gravity;
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-hdpi/ic_launcher.png b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-hdpi/ic_launcher.png
rename to connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-mdpi/ic_launcher.png b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-mdpi/ic_launcher.png
rename to connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-xhdpi/ic_launcher.png b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-xhdpi/ic_launcher.png
rename to connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-xxhdpi/ic_launcher.png b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/network/NetworkConnect/NetworkConnect/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/activity_main.xml b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/layout/sample_main.xml
similarity index 90%
copy from connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/activity_main.xml
copy to connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/layout/sample_main.xml
index f21b1ac..76fa7d7 100755
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/layout/activity_main.xml
+++ b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/layout/sample_main.xml
@@ -22,7 +22,7 @@
     android:layout_width="fill_parent"
     android:layout_height="fill_parent">
     <fragment
-        android:name="com.example.android.common.SimpleTextFragment"
+        android:name="com.example.android.networkconnect.SimpleTextFragment"
         android:id="@+id/intro_fragment"
         android:layout_weight="1"
         android:layout_width="match_parent"
@@ -32,7 +32,7 @@
         android:layout_height="1dp"
         android:background="@android:color/darker_gray"/>
     <fragment
-        android:name="com.example.android.networkconnect.LogFragment"
+        android:name="com.example.android.common.logger.LogFragment"
         android:id="@+id/log_fragment"
         android:layout_weight="1"
         android:layout_width="match_parent"
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/menu/main.xml b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/menu/main.xml
similarity index 100%
rename from connectivity/network/NetworkConnect/NetworkConnect/src/main/res/menu/main.xml
rename to connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/menu/main.xml
diff --git a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/strings.xml b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/values/strings.xml
similarity index 88%
rename from connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/strings.xml
rename to connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/values/strings.xml
index 756f4a7..1e7915a 100755
--- a/connectivity/network/NetworkConnect/NetworkConnect/src/main/res/values/strings.xml
+++ b/connectivity/network/NetworkConnect/NetworkConnectSample/src/main/res/values/strings.xml
@@ -15,9 +15,7 @@
   -->
 
 <resources>
-    <string name="app_name">Network Connect</string>
-
-    <string name="intro_message">Welcome to Network Connect!
+    <string name="welcome_message">Welcome to Network Connect!
         Click FETCH to fetch the first 500 characters of raw HTML from www.google.com.
     </string>
 
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/tests/AndroidManifest.xml b/connectivity/network/NetworkConnect/NetworkConnectSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnectSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/NetworkConnectSample/tests/src/com/example/android/networkconnect/tests/SampleTests.java b/connectivity/network/NetworkConnect/NetworkConnectSample/tests/src/com/example/android/networkconnect/tests/SampleTests.java
new file mode 100644
index 0000000..a554964
--- /dev/null
+++ b/connectivity/network/NetworkConnect/NetworkConnectSample/tests/src/com/example/android/networkconnect/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.networkconnect.tests;
+
+import com.example.android.networkconnect.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for NetworkConnect sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private NetworkConnectFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (NetworkConnectFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/README.txt b/connectivity/network/NetworkConnect/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/connectivity/network/NetworkConnect/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/connectivity/network/NetworkConnect/_index.jd b/connectivity/network/NetworkConnect/_index.jd
new file mode 100644
index 0000000..f9d507b
--- /dev/null
+++ b/connectivity/network/NetworkConnect/_index.jd
@@ -0,0 +1,13 @@
+
+
+
+page.tags="NetworkConnect"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+            This sample demonstrates how to connect to the network and fetch raw HTML using
+            HttpURLConnection. AsyncTask is used to perform the fetch on a background thread.
+            
+        </p>
diff --git a/connectivity/network/NetworkConnect/build.gradle b/connectivity/network/NetworkConnect/build.gradle
index 036abc8..ffb5c2f 100644
--- a/connectivity/network/NetworkConnect/build.gradle
+++ b/connectivity/network/NetworkConnect/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/connectivity/network/NetworkConnect/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to connectivity/network/NetworkConnect/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/connectivity/network/NetworkConnect/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties b/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/network/NetworkConnect/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/connectivity/network/NetworkConnect/settings.gradle b/connectivity/network/NetworkConnect/settings.gradle
index 771d665..ebae091 100644
--- a/connectivity/network/NetworkConnect/settings.gradle
+++ b/connectivity/network/NetworkConnect/settings.gradle
@@ -1 +1,4 @@
-include ':NetworkConnect'
+
+
+
+include 'NetworkConnectSample'
diff --git a/connectivity/network/NetworkConnect/template-params.xml b/connectivity/network/NetworkConnect/template-params.xml
new file mode 100644
index 0000000..82617f8
--- /dev/null
+++ b/connectivity/network/NetworkConnect/template-params.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>NetworkConnect</name>
+    <group>NoGroup</group>
+    <package>com.example.android.networkconnect</package>
+
+
+
+    <!-- change minSdk if needed-->
+    <minSdk>8</minSdk>
+
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample demonstrates how to connect to the network and fetch raw HTML using
+            HttpURLConnection. AsyncTask is used to perform the fetch on a background thread.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/build.gradle b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/build.gradle
deleted file mode 100644
index 9424fe8..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/build.gradle
+++ /dev/null
@@ -1,25 +0,0 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
-}
-
-apply plugin: 'android'
-
-repositories {
-    mavenCentral()
-}
-
-dependencies {
-    compile 'com.google.guava:guava:14.0.+'
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v11/styles.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v11/styles.xml
deleted file mode 100644
index ff65301..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-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>
-
-    <!--
-        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">
-        <!-- API 11 theme customizations can go here. -->
-    </style>
-
-</resources>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v14/styles.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v14/styles.xml
deleted file mode 100644
index a4a443a..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values-v14/styles.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-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>
-
-    <!--
-        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>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/styles.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/styles.xml
deleted file mode 100644
index 43a8f2b..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-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>
-
-    <!--
-        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>
-
-</resources>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/.gitignore b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/proguard-project.txt
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/AndroidManifest.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/AndroidManifest.xml
similarity index 75%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/AndroidManifest.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/AndroidManifest.xml
index 385b293..dd59b06 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/AndroidManifest.xml
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/AndroidManifest.xml
@@ -1,8 +1,26 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.network.sync.basicsyncadapter"
+    package="com.example.android.basicsyncadapter"
     android:versionCode="1"
-    android:versionName="1.0" >
+    android:versionName="1.0">
 
     <!-- SyncAdapters are available in API 5 and above. We use API 7 as a baseline for samples. -->
     <uses-sdk
@@ -27,7 +45,7 @@
 
         <!-- Main activity, responsible for showing a list of feed entries. -->
         <activity
-            android:name="com.example.android.network.sync.basicsyncadapter.EntryListActivity"
+            android:name=".EntryListActivity"
             android:label="@string/app_name" >
             <!-- This intent filter places this activity in the system's app launcher. -->
             <intent-filter>
@@ -45,14 +63,14 @@
         Since this ContentProvider is not exported, it will not be accessible outside of this app's
         package. -->
         <provider
-                android:name=".provider.FeedProvider"
-                android:authorities="com.example.android.network.sync.basicsyncadapter"
-                android:exported="false" />
+            android:name=".provider.FeedProvider"
+            android:authorities="com.example.android.basicsyncadapter"
+            android:exported="false" />
 
         <!-- This service implements our SyncAdapter. It needs to be exported, so that the system
         sync framework can access it. -->
         <service android:name=".SyncService"
-                 android:exported="true">
+            android:exported="true">
             <!-- This intent filter is required. It allows the system to launch our sync service
             as needed. -->
             <intent-filter>
@@ -60,7 +78,7 @@
             </intent-filter>
             <!-- This points to a required XML file which describes our SyncAdapter. -->
             <meta-data android:name="android.content.SyncAdapter"
-                       android:resource="@xml/syncadapter" />
+                android:resource="@xml/syncadapter" />
         </service>
 
         <!-- This implements the account we'll use as an attachment point for our SyncAdapter. Since
@@ -76,9 +94,9 @@
             </intent-filter>
             <!-- This points to an XMLf ile which describes our account service. -->
             <meta-data android:name="android.accounts.AccountAuthenticator"
-                       android:resource="@xml/authenticator" />
+                android:resource="@xml/authenticator" />
         </service>
 
-</application>
+    </application>
 
-</manifest>
\ No newline at end of file
+</manifest>
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListActivity.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListActivity.java
similarity index 85%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListActivity.java
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListActivity.java
index cff0702..9d8cb77 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListActivity.java
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListActivity.java
@@ -1,4 +1,4 @@
-package com.example.android.network.sync.basicsyncadapter;
+package com.example.android.basicsyncadapter;
 
 import android.os.Bundle;
 import android.support.v4.app.FragmentActivity;
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListFragment.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListFragment.java
similarity index 97%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListFragment.java
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListFragment.java
index 0efeb40..83e240a 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/EntryListFragment.java
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/EntryListFragment.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.network.sync.basicsyncadapter;
+package com.example.android.basicsyncadapter;
 
 import android.accounts.Account;
 import android.annotation.TargetApi;
@@ -41,13 +41,13 @@
 import android.widget.TextView;
 
 import com.example.android.common.accounts.GenericAccountService;
-import com.example.android.network.sync.basicsyncadapter.provider.FeedContract;
+import com.example.android.basicsyncadapter.provider.FeedContract;
 
 /**
  * List fragment containing a list of Atom entry objects (articles) stored in the local database.
  *
  * <p>Database access is mediated by a content provider, specified in
- * {@link com.example.android.network.sync.basicsyncadapter.provider.FeedProvider}. This content
+ * {@link com.example.android.basicsyncadapter.provider.FeedProvider}. This content
  * provider is
  * automatically populated by  {@link SyncService}.
  *
@@ -333,7 +333,7 @@
                     // Create a handle to the account that was created by
                     // SyncService.CreateSyncAccount(). This will be used to query the system to
                     // see how the sync status has changed.
-                    Account account = GenericAccountService.GetAccount();
+                    Account account = GenericAccountService.GetAccount(SyncUtils.ACCOUNT_TYPE);
                     if (account == null) {
                         // GetAccount() returned an invalid value. This shouldn't happen, but
                         // we'll set the status to "not refreshing".
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncAdapter.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncAdapter.java
similarity index 96%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncAdapter.java
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncAdapter.java
index a759adb..da67107 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncAdapter.java
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncAdapter.java
@@ -14,9 +14,10 @@
  * limitations under the License.
  */
 
-package com.example.android.network.sync.basicsyncadapter;
+package com.example.android.basicsyncadapter;
 
 import android.accounts.Account;
+import android.annotation.TargetApi;
 import android.content.AbstractThreadedSyncAdapter;
 import android.content.ContentProviderClient;
 import android.content.ContentProviderOperation;
@@ -26,12 +27,13 @@
 import android.content.SyncResult;
 import android.database.Cursor;
 import android.net.Uri;
+import android.os.Build;
 import android.os.Bundle;
 import android.os.RemoteException;
 import android.util.Log;
 
-import com.example.android.network.sync.basicsyncadapter.net.FeedParser;
-import com.example.android.network.sync.basicsyncadapter.provider.FeedContract;
+import com.example.android.basicsyncadapter.net.FeedParser;
+import com.example.android.basicsyncadapter.provider.FeedContract;
 
 import org.xmlpull.v1.XmlPullParserException;
 
@@ -108,6 +110,7 @@
     /**
      * Constructor. Obtains handle to content resolver for later use.
      */
+    @TargetApi(Build.VERSION_CODES.HONEYCOMB)
     public SyncAdapter(Context context, boolean autoInitialize, boolean allowParallelSyncs) {
         super(context, autoInitialize, allowParallelSyncs);
         mContentResolver = context.getContentResolver();
@@ -122,7 +125,7 @@
      .
      *
      * <p>This is where we actually perform any work required to perform a sync.
-     * {@link AbstractThreadedSyncAdapter} guarantees that this will be called on a non-UI thread,
+     * {@link android.content.AbstractThreadedSyncAdapter} guarantees that this will be called on a non-UI thread,
      * so it is safe to peform blocking I/O here.
      *
      * <p>The syncResult argument allows you to pass information back to the method that triggered
@@ -148,7 +151,7 @@
                 }
             }
         } catch (MalformedURLException e) {
-            Log.wtf(TAG, "Feed URL is malformed", e);
+            Log.e(TAG, "Feed URL is malformed", e);
             syncResult.stats.numParseExceptions++;
             return;
         } catch (IOException e) {
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncService.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncService.java
similarity index 97%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncService.java
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncService.java
index bd92f37..41e9c03 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncService.java
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncService.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.network.sync.basicsyncadapter;
+package com.example.android.basicsyncadapter;
 
 import android.app.Service;
 import android.content.Intent;
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncUtils.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncUtils.java
similarity index 82%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncUtils.java
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncUtils.java
index c6552da..b327c72 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/SyncUtils.java
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/SyncUtils.java
@@ -14,17 +14,19 @@
  * limitations under the License.
  */
 
-package com.example.android.network.sync.basicsyncadapter;
+package com.example.android.basicsyncadapter;
 
 import android.accounts.Account;
 import android.accounts.AccountManager;
+import android.annotation.TargetApi;
 import android.content.ContentResolver;
 import android.content.Context;
+import android.os.Build;
 import android.os.Bundle;
 import android.preference.PreferenceManager;
 
 import com.example.android.common.accounts.GenericAccountService;
-import com.example.android.network.sync.basicsyncadapter.provider.FeedContract;
+import com.example.android.basicsyncadapter.provider.FeedContract;
 
 /**
  * Static helper methods for working with the sync framework.
@@ -33,20 +35,24 @@
     private static final long SYNC_FREQUENCY = 60 * 60;  // 1 hour (in seconds)
     private static final String CONTENT_AUTHORITY = FeedContract.CONTENT_AUTHORITY;
     private static final String PREF_SETUP_COMPLETE = "setup_complete";
+    // Value below must match the account type specified in res/xml/syncadapter.xml
+    public static final String ACCOUNT_TYPE = "com.example.android.basicsyncadapter.account";
 
     /**
      * Create an entry for this application in the system account list, if it isn't already there.
      *
      * @param context Context
      */
+    @TargetApi(Build.VERSION_CODES.FROYO)
     public static void CreateSyncAccount(Context context) {
         boolean newAccount = false;
         boolean setupComplete = PreferenceManager
                 .getDefaultSharedPreferences(context).getBoolean(PREF_SETUP_COMPLETE, false);
 
         // Create account, if it's missing. (Either first run, or user has deleted account.)
-        Account account = GenericAccountService.GetAccount();
-        AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);
+        Account account = GenericAccountService.GetAccount(ACCOUNT_TYPE);
+        AccountManager accountManager =
+                (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);
         if (accountManager.addAccountExplicitly(account, null, null)) {
             // Inform the system that this account supports sync
             ContentResolver.setIsSyncable(account, CONTENT_AUTHORITY, 1);
@@ -86,8 +92,8 @@
         b.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
         b.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
         ContentResolver.requestSync(
-                GenericAccountService.GetAccount(),      // Sync account
-                FeedContract.CONTENT_AUTHORITY, // Content authority
-                b);                                      // Extras
+                GenericAccountService.GetAccount(ACCOUNT_TYPE), // Sync account
+                FeedContract.CONTENT_AUTHORITY,                 // Content authority
+                b);                                             // Extras
     }
 }
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/net/FeedParser.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/net/FeedParser.java
similarity index 94%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/net/FeedParser.java
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/net/FeedParser.java
index 2bcbc0f..a778390 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/net/FeedParser.java
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/net/FeedParser.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.network.sync.basicsyncadapter.net;
+package com.example.android.basicsyncadapter.net;
 
 import android.text.format.Time;
 import android.util.Xml;
@@ -51,9 +51,9 @@
     /** Parse an Atom feed, returning a collection of Entry objects.
      *
      * @param in Atom feed, as a stream.
-     * @return List of {@link Entry} objects.
-     * @throws XmlPullParserException on error parsing feed.
-     * @throws IOException on I/O error.
+     * @return List of {@link com.example.android.basicsyncadapter.net.FeedParser.Entry} objects.
+     * @throws org.xmlpull.v1.XmlPullParserException on error parsing feed.
+     * @throws java.io.IOException on I/O error.
      */
     public List<Entry> parse(InputStream in)
             throws XmlPullParserException, IOException, ParseException {
@@ -72,9 +72,9 @@
      * Decode a feed attached to an XmlPullParser.
      *
      * @param parser Incoming XMl
-     * @return List of {@link Entry} objects.
-     * @throws XmlPullParserException on error parsing feed.
-     * @throws IOException on I/O error.
+     * @return List of {@link com.example.android.basicsyncadapter.net.FeedParser.Entry} objects.
+     * @throws org.xmlpull.v1.XmlPullParserException on error parsing feed.
+     * @throws java.io.IOException on I/O error.
      */
     private List<Entry> readFeed(XmlPullParser parser)
             throws XmlPullParserException, IOException, ParseException {
@@ -193,8 +193,8 @@
      * @param parser Current parser object
      * @param tag XML element tag name to parse
      * @return Body of the specified tag
-     * @throws IOException
-     * @throws XmlPullParserException
+     * @throws java.io.IOException
+     * @throws org.xmlpull.v1.XmlPullParserException
      */
     private String readBasicTag(XmlPullParser parser, String tag)
             throws IOException, XmlPullParserException {
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedContract.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedContract.java
similarity index 90%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedContract.java
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedContract.java
index 7bfcf7f..e29ec48 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedContract.java
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedContract.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.network.sync.basicsyncadapter.provider;
+package com.example.android.basicsyncadapter.provider;
 
 import android.content.ContentResolver;
 import android.net.Uri;
@@ -22,7 +22,7 @@
 
 /**
  * Field and table name constants for
- * {@link com.example.android.network.sync.basicsyncadapter.provider.FeedProvider}.
+ * {@link com.example.android.basicsyncadapter.provider.FeedProvider}.
  */
 public class FeedContract {
     private FeedContract() {
@@ -31,10 +31,10 @@
     /**
      * Content provider authority.
      */
-    public static final String CONTENT_AUTHORITY = "com.example.android.network.sync.basicsyncadapter";
+    public static final String CONTENT_AUTHORITY = "com.example.android.basicsyncadapter";
 
     /**
-     * Base URI. (content://com.example.android.network.sync.basicsyncadapter)
+     * Base URI. (content://com.example.android.basicsyncadapter)
      */
     public static final Uri BASE_CONTENT_URI = Uri.parse("content://" + CONTENT_AUTHORITY);
 
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedProvider.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedProvider.java
similarity index 98%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedProvider.java
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedProvider.java
index 358e324..80bf1d3 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/java/com/example/android/network/sync/basicsyncadapter/provider/FeedProvider.java
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/java/com/example/android/basicsyncadapter/provider/FeedProvider.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.network.sync.basicsyncadapter.provider;
+package com.example.android.basicsyncadapter.provider;
 
 import android.content.ContentProvider;
 import android.content.ContentValues;
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-hdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-hdpi/ic_launcher.png
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-mdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-mdpi/ic_launcher.png
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xhdpi/ic_action_refresh.png b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xhdpi/ic_action_refresh.png
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xhdpi/ic_action_refresh.png
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xhdpi/ic_action_refresh.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xhdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xhdpi/ic_launcher.png
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xxhdpi/ic_launcher.png b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/layout/actionbar_indeterminate_progress.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/layout/actionbar_indeterminate_progress.xml
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/layout/actionbar_indeterminate_progress.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/layout/actionbar_indeterminate_progress.xml
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/layout/activity_entry_list.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/layout/activity_entry_list.xml
similarity index 83%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/layout/activity_entry_list.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/layout/activity_entry_list.xml
index 6e3e2fd..3c8c901 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/layout/activity_entry_list.xml
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/layout/activity_entry_list.xml
@@ -3,7 +3,7 @@
 <fragment xmlns:android="http://schemas.android.com/apk/res/android"
           xmlns:tools="http://schemas.android.com/tools"
           android:id="@+id/entry_list"
-          android:name="com.example.android.network.sync.basicsyncadapter.EntryListFragment"
+          android:name="com.example.android.basicsyncadapter.EntryListFragment"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:layout_marginLeft="16dp"
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/menu/main.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/menu/main.xml
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/menu/main.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/menu/main.xml
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/attrs.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/attrs.xml
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/attrs.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/attrs.xml
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/dimen.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/dimen.xml
similarity index 100%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/dimen.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/dimen.xml
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/strings.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/strings.xml
similarity index 94%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/strings.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/strings.xml
index 0271850..f4cade9 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/values/strings.xml
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/values/strings.xml
@@ -16,7 +16,6 @@
 -->
 
 <resources>
-    <string name="app_name">FeedSync Sample</string>
     <string name="account_name">FeedSync Service</string>
     <string name="title_entry_detail">Entry Detail</string>
     <string name="loading">Waiting for sync...</string>
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/authenticator.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/authenticator.xml
similarity index 96%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/authenticator.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/authenticator.xml
index cb69a66..8b96907 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/authenticator.xml
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/authenticator.xml
@@ -16,7 +16,7 @@
 -->
 
 <account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
-                       android:accountType="com.example.android.network.sync.basicsyncadapter"
+                       android:accountType="com.example.android.basicsyncadapter.account"
                        android:icon="@drawable/ic_launcher"
                        android:smallIcon="@drawable/ic_launcher"
                        android:label="@string/app_name"
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/syncadapter.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/syncadapter.xml
similarity index 83%
rename from connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/syncadapter.xml
rename to connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/syncadapter.xml
index 0fcd6e3..6e12882 100644
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapter/src/main/res/xml/syncadapter.xml
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/src/main/res/xml/syncadapter.xml
@@ -16,8 +16,8 @@
 -->
 
 <sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
-              android:contentAuthority="com.example.android.network.sync.basicsyncadapter"
-              android:accountType="com.example.android.network.sync.basicsyncadapter"
+              android:contentAuthority="com.example.android.basicsyncadapter"
+              android:accountType="com.example.android.basicsyncadapter.account"
               android:userVisible="false"
               android:supportsUploading="false"
               android:allowParallelSyncs="false"
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/AndroidManifest.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/src/com/example/android/basicsyncadapter/tests/SampleTests.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/src/com/example/android/basicsyncadapter/tests/SampleTests.java
new file mode 100644
index 0000000..08798ba
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterSample/tests/src/com/example/android/basicsyncadapter/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.basicsyncadapter.tests;
+
+import com.example.android.basicsyncadapter.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for BasicSyncAdapter sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private BasicSyncAdapterFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (BasicSyncAdapterFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/AndroidManifest.xml b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/AndroidManifest.xml
deleted file mode 100644
index 91c9861..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/AndroidManifest.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.network.sync.basicsyncadapter.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-    <uses-sdk
-            android:minSdkVersion="11"
-            android:targetSdkVersion="17" />
-
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner"/>
-    </application>
-    <!--
-    This declares that this application uses the instrumentation test runner targeting
-    the package of com.android.example.FeedSyncSampleTo run the tests use the command:
-    "adb shell am instrument -w com.android.example.FeedSyncSamplests/android.test.InstrumentationTestRunner"
-    -->
-    <instrumentation
-            android:name="android.test.InstrumentationTestRunner"
-            android:targetPackage="com.example.android.network.sync.basicsyncadapter"
-            android:label="Tests for com.example.android.network.sync.BasicSyncAdapter"/>
-</manifest>
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/proguard-project.txt b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/proguard-project.txt
deleted file mode 100644
index f2fe155..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/SyncAdapterTest.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/SyncAdapterTest.java
deleted file mode 100644
index 820882d..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/SyncAdapterTest.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package com.example.android.network.sync.basicsyncadapter;
-
-import android.content.ContentResolver;
-import android.content.Context;
-import android.content.OperationApplicationException;
-import android.content.SyncResult;
-import android.database.Cursor;
-import android.os.RemoteException;
-import android.test.ServiceTestCase;
-
-import com.example.android.network.sync.basicsyncadapter.provider.FeedContract;
-
-import org.xmlpull.v1.XmlPullParserException;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.ParseException;
-
-public class SyncAdapterTest extends ServiceTestCase<SyncService> {
-    public SyncAdapterTest() {
-        super(SyncService.class);
-    }
-
-    public void testIncomingFeedParsed()
-            throws IOException, XmlPullParserException, RemoteException,
-            OperationApplicationException, ParseException {
-        String sampleFeed = "<?xml version=\"1.0\"?>\n" +
-                "<feed xmlns=\"http://www.w3.org/2005/Atom\">\n" +
-                " \n" +
-                "  <title>Sample Blog</title>\n" +
-                "  <link href=\"http://example.com/\"/>\n" +
-                "  <link type=\"application/atom+xml\" rel=\"self\" href=\"http://example.xom/feed.xml\"/>\n" +
-                "  <updated>2013-05-16T16:53:23-07:00</updated>\n" +
-                "  <id>http://example.com/</id>\n" +
-                "  <author>\n" +
-                "    <name>Rick Deckard</name>\n" +
-                "    <email>deckard@example.com</email>\n" +
-                "  </author>\n" +
-                "\n" +
-                "  <entry>\n" +
-                "    <id>http://example.com/2012/10/20/test-post</id>\n" +
-                "    <link type=\"text/html\" rel=\"alternate\" href=\"http://example.com/2012/10/20/test-post.html\"/>\n" +
-                "    <title>Test Post #1</title>\n" +
-                "    <published>2012-10-20T00:00:00-07:00</published>\n" +
-                "    <updated>2012-10-20T00:00:00-07:00</updated>\n" +
-                "    <author>\n" +
-                "      <name>Rick Deckard</name>\n" +
-                "      <uri>http://example.com/</uri>\n" +
-                "    </author>\n" +
-                "    <summary>This is a sample summary.</summary>\n" +
-                "    <content type=\"html\">Here's some <em>sample</em> content.</content>\n" +
-                "  </entry>\n" +
-                "</feed>\n";
-        InputStream stream = new ByteArrayInputStream(sampleFeed.getBytes());
-        SyncAdapter adapter = new SyncAdapter(getContext(), false);
-        adapter.updateLocalFeedData(stream, new SyncResult());
-
-        Context ctx = getContext();
-        assert ctx != null;
-        ContentResolver cr = ctx.getContentResolver();
-        final String[] projection = {FeedContract.Entry.COLUMN_NAME_ENTRY_ID,
-                FeedContract.Entry.COLUMN_NAME_TITLE,
-                FeedContract.Entry.COLUMN_NAME_LINK};
-        Cursor c = cr.query(FeedContract.Entry.CONTENT_URI, projection, null, null, null);
-        assert c != null;
-        assertEquals(1, c.getCount());
-        c.moveToFirst();
-        assertEquals("http://example.com/2012/10/20/test-post", c.getString(0));
-        assertEquals("Test Post #1", c.getString(1));
-        assertEquals("http://example.com/2012/10/20/test-post.html", c.getString(2));
-    }
-}
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/net/FeedParserTest.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/net/FeedParserTest.java
deleted file mode 100644
index 0c66871..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/net/FeedParserTest.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.example.android.network.sync.basicsyncadapter.net;
-
-import junit.framework.TestCase;
-
-public class FeedParserTest extends TestCase {
-    public FeedParserTest() {
-        super();
-    }
-
-//    public void testEntriesEqualById() {
-//        FeedParser.Entry e1 = new FeedParser.Entry("alpha", "Aardvark", "Bear", "Cat");
-//        FeedParser.Entry e2 = new FeedParser.Entry("alpha", "Dog", "Elephant", "Faun");
-//        assertEquals(e1, e2);
-//    }
-//
-//    public void testEntriesHashById() {
-//        FeedParser.Entry e1 = new FeedParser.Entry("alpha", "Aardvark", "Bear", "Cat");
-//        FeedParser.Entry e2 = new FeedParser.Entry("alpha", "Dog", "Elephant", "Faun");
-//        assertEquals(e1.hashCode(), e2.hashCode());
-//    }
-}
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/provider/FeedProviderTest.java b/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/provider/FeedProviderTest.java
deleted file mode 100644
index a80b5ca..0000000
--- a/connectivity/sync/BasicSyncAdapter/BasicSyncAdapterTests/src/com/example/android/network/sync/basicsyncadapter/provider/FeedProviderTest.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package com.example.android.network.sync.basicsyncadapter.provider;
-
-import android.content.ContentValues;
-import android.database.Cursor;
-import android.net.Uri;
-import android.test.ProviderTestCase2;
-
-public class FeedProviderTest extends ProviderTestCase2<FeedProvider>  {
-    public FeedProviderTest() {
-        super(FeedProvider.class, FeedContract.CONTENT_AUTHORITY);
-    }
-
-    public void testEntryContentUriIsSane() {
-        assertEquals(Uri.parse("content://com.example.android.network.sync.basicsyncadapter/entries"),
-                FeedContract.Entry.CONTENT_URI);
-    }
-
-    public void testCreateAndRetrieve() {
-        // Create
-        ContentValues newValues = new ContentValues();
-        newValues.put(FeedContract.Entry.COLUMN_NAME_TITLE, "MyTitle");
-        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://example.com");
-        newValues.put(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, "MyEntryID");
-        Uri newUri = getMockContentResolver().insert(
-                FeedContract.Entry.CONTENT_URI,
-                newValues);
-
-        // Retrieve
-        String[] projection = {
-                FeedContract.Entry.COLUMN_NAME_TITLE,      // 0
-                FeedContract.Entry.COLUMN_NAME_LINK,       // 1
-                FeedContract.Entry.COLUMN_NAME_ENTRY_ID};  // 2
-        Cursor c = getMockContentResolver().query(newUri, projection, null, null, null);
-        assertEquals(1, c.getCount());
-        c.moveToFirst();
-        assertEquals("MyTitle", c.getString(0));
-        assertEquals("http://example.com", c.getString(1));
-        assertEquals("MyEntryID", c.getString(2));
-    }
-
-    public void testCreateAndQuery() {
-        // Create
-        ContentValues newValues = new ContentValues();
-        newValues.put(FeedContract.Entry.COLUMN_NAME_TITLE, "Alpha-MyTitle");
-        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://alpha.example.com");
-        newValues.put(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, "Alpha-MyEntryID");
-        getMockContentResolver().insert(
-                FeedContract.Entry.CONTENT_URI,
-                newValues);
-
-        newValues = new ContentValues();
-        newValues.put(FeedContract.Entry.COLUMN_NAME_TITLE, "Beta-MyTitle");
-        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://beta.example.com");
-        newValues.put(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, "Beta-MyEntryID");
-        getMockContentResolver().insert(
-                FeedContract.Entry.CONTENT_URI,
-                newValues);
-
-        // Retrieve
-        String[] projection = {
-                FeedContract.Entry.COLUMN_NAME_TITLE,      // 0
-                FeedContract.Entry.COLUMN_NAME_LINK,       // 1
-                FeedContract.Entry.COLUMN_NAME_ENTRY_ID};  // 2
-        String where = FeedContract.Entry.COLUMN_NAME_TITLE + " LIKE ?";
-        Cursor c = getMockContentResolver().query(FeedContract.Entry.CONTENT_URI, projection,
-                where, new String[] {"Alpha%"}, null);
-        assertEquals(1, c.getCount());
-        c.moveToFirst();
-        assertEquals("Alpha-MyTitle", c.getString(0));
-        assertEquals("http://alpha.example.com", c.getString(1));
-        assertEquals("Alpha-MyEntryID", c.getString(2));
-    }
-
-    public void testUpdate() {
-        // Create
-        ContentValues newValues = new ContentValues();
-        newValues.put(FeedContract.Entry.COLUMN_NAME_TITLE, "Alpha-MyTitle");
-        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://alpha.example.com");
-        newValues.put(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, "Alpha-MyEntryID");
-        Uri alpha = getMockContentResolver().insert(
-                FeedContract.Entry.CONTENT_URI,
-                newValues);
-
-        newValues = new ContentValues();
-        newValues.put(FeedContract.Entry.COLUMN_NAME_TITLE, "Beta-MyTitle");
-        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://beta.example.com");
-        newValues.put(FeedContract.Entry.COLUMN_NAME_ENTRY_ID, "Beta-MyEntryID");
-        Uri beta = getMockContentResolver().insert(
-                FeedContract.Entry.CONTENT_URI,
-                newValues);
-
-        // Update
-        newValues = new ContentValues();
-        newValues.put(FeedContract.Entry.COLUMN_NAME_LINK, "http://replaced.example.com");
-        getMockContentResolver().update(alpha, newValues, null, null);
-
-        // Retrieve
-        String[] projection = {
-                FeedContract.Entry.COLUMN_NAME_TITLE,      // 0
-                FeedContract.Entry.COLUMN_NAME_LINK,       // 1
-                FeedContract.Entry.COLUMN_NAME_ENTRY_ID};  // 2
-        // Check that alpha was updated
-        Cursor c = getMockContentResolver().query(alpha, projection, null, null, null);
-        assertEquals(1, c.getCount());
-        c.moveToFirst();
-        assertEquals("Alpha-MyTitle", c.getString(0));
-        assertEquals("http://replaced.example.com", c.getString(1));
-        assertEquals("Alpha-MyEntryID", c.getString(2));
-
-        // ...and that beta was not
-        c = getMockContentResolver().query(beta, projection, null, null, null);
-        assertEquals(1, c.getCount());
-        c.moveToFirst();
-        assertEquals("Beta-MyTitle", c.getString(0));
-        assertEquals("http://beta.example.com", c.getString(1));
-        assertEquals("Beta-MyEntryID", c.getString(2));
-    }
-
-}
diff --git a/connectivity/sync/BasicSyncAdapter/README.txt b/connectivity/sync/BasicSyncAdapter/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/connectivity/sync/BasicSyncAdapter/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/connectivity/sync/BasicSyncAdapter/build.gradle b/connectivity/sync/BasicSyncAdapter/build.gradle
index 495c503..ffb5c2f 100644
--- a/connectivity/sync/BasicSyncAdapter/build.gradle
+++ b/connectivity/sync/BasicSyncAdapter/build.gradle
@@ -1 +1,11 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
+}
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/connectivity/sync/BasicSyncAdapter/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to connectivity/sync/BasicSyncAdapter/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/connectivity/sync/BasicSyncAdapter/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties b/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..5c22dec 100644
--- a/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties
+++ b/connectivity/sync/BasicSyncAdapter/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,4 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
diff --git a/connectivity/sync/BasicSyncAdapter/settings.gradle b/connectivity/sync/BasicSyncAdapter/settings.gradle
index 5f2be67..a691e9e 100644
--- a/connectivity/sync/BasicSyncAdapter/settings.gradle
+++ b/connectivity/sync/BasicSyncAdapter/settings.gradle
@@ -1 +1,4 @@
-include ':BasicSyncAdapter'
+
+
+
+include 'BasicSyncAdapterSample'
diff --git a/connectivity/sync/BasicSyncAdapter/template-params.xml b/connectivity/sync/BasicSyncAdapter/template-params.xml
new file mode 100644
index 0000000..ba1feff
--- /dev/null
+++ b/connectivity/sync/BasicSyncAdapter/template-params.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>BasicSyncAdapter</name>
+    <package>com.example.android.basicsyncadapter</package>
+
+
+    <!-- change minSdk if needed-->
+    <minSdk>7</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample demonstrates using SyncAdapter to fetch background data for an app that
+            doesn\'t require a user-visible account type or 2-way synchronization.
+
+            \n\nThis sample periodically downloads the feed from the Android Developer Blog and
+            caches the data in a content provider. At runtime, the cached feed data is displayed
+            inside a ListView.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="accounts"/>
+    <common src="db"/>
+    <common src="logger"/>
+</sample>
diff --git a/content/contacts/BasicContactables/BasicContactables/build.gradle b/content/contacts/BasicContactables/BasicContactables/build.gradle
deleted file mode 100644
index 10fb811..0000000
--- a/content/contacts/BasicContactables/BasicContactables/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-hdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100755
index 22ce606..0000000
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-mdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100755
index f21e17b..0000000
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xhdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100755
index 64b8059..0000000
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xxhdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100755
index 6b4434a..0000000
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/dimens.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/dimens.xml
deleted file mode 100644
index 886b05f..0000000
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/dimens.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<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/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/styles.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/styles.xml
deleted file mode 100644
index 2bbb45f..0000000
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw600dp/styles.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  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.SampleOutput">
-        <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>
-        <item name="android:textAppearance">?android:textAppearanceLarge</item>
-        <item name="android:lineSpacingMultiplier">1.2</item>
-    </style>
-
-</resources>
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw720dp-land/dimens.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw720dp-land/dimens.xml
deleted file mode 100644
index 00059fc..0000000
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/values-sw720dp-land/dimens.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<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/content/contacts/BasicContactables/BasicContactables/src/main/res/values/dimens.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values/dimens.xml
deleted file mode 100644
index a83b995..0000000
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  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/content/contacts/BasicContactables/BasicContactables/src/main/res/values/strings.xml b/content/contacts/BasicContactables/BasicContactables/src/main/res/values/strings.xml
deleted file mode 100755
index 31ceceb..0000000
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  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">Basic Contactables Query</string>
-    <string name="intro_message">Welcome to <b>Basic Contactables Query</b>!\n\n
-        Use the search box to enter a term, and find matching contacts in
-        Android\'s contact database!
-    </string>
-    <string name="sample_action">Sample action</string>
-    <string name="search_title">Search Contacts</string>
-</resources>
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/.gitignore b/content/contacts/BasicContactables/BasicContactablesSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactablesSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/content/contacts/BasicContactables/BasicContactablesSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to content/contacts/BasicContactables/BasicContactablesSample/proguard-project.txt
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/AndroidManifest.xml b/content/contacts/BasicContactables/BasicContactablesSample/src/main/AndroidManifest.xml
similarity index 67%
rename from content/contacts/BasicContactables/BasicContactables/src/main/AndroidManifest.xml
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/AndroidManifest.xml
index b008e84..62b9812 100644
--- a/content/contacts/BasicContactables/BasicContactables/src/main/AndroidManifest.xml
+++ b/content/contacts/BasicContactables/BasicContactablesSample/src/main/AndroidManifest.xml
@@ -1,9 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.basiccontactables"
     android:versionCode="1"
     android:versionName="1.0" >
-    
+
     <!-- BEGIN_INCLUDE(contacts_permission) -->
     <uses-permission android:name="android.permission.READ_CONTACTS"/>
     <!-- END_INCLUDE(contacts_permission) -->
@@ -21,7 +37,7 @@
             android:name="com.example.android.basiccontactables.MainActivity"
             android:label="@string/app_name"
             android:launchMode="singleTop">
-            <meta-data 
+            <meta-data
                 android:name="android.app.searchable"
                 android:resource="@xml/searchable" />
             <intent-filter>
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java b/content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java
similarity index 89%
rename from content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java
index c583dac..4fc4da7 100644
--- a/content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java
+++ b/content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/ContactablesLoaderCallbacks.java
@@ -23,7 +23,6 @@
 import android.database.Cursor;
 import android.net.Uri;
 import android.os.Bundle;
-import android.provider.ContactsContract;
 import android.provider.ContactsContract.CommonDataKinds;
 import android.util.Log;
 import android.widget.TextView;
@@ -55,17 +54,17 @@
         // BEGIN_INCLUDE(uri_with_query)
         String query = args.getString(QUERY_KEY);
         Uri uri = Uri.withAppendedPath(
-                ContactsContract.CommonDataKinds.Contactables.CONTENT_FILTER_URI, query);
+                CommonDataKinds.Contactables.CONTENT_FILTER_URI, query);
         // END_INCLUDE(uri_with_query)
 
 
         // BEGIN_INCLUDE(cursor_loader)
         // Easy way to limit the query to contacts with phone numbers.
         String selection =
-                ContactsContract.CommonDataKinds.Contactables.HAS_PHONE_NUMBER + " = " + 1;
+                CommonDataKinds.Contactables.HAS_PHONE_NUMBER + " = " + 1;
 
         // Sort results such that rows for the same contact stay together.
-        String sortBy = ContactsContract.CommonDataKinds.Contactables.LOOKUP_KEY;
+        String sortBy = CommonDataKinds.Contactables.LOOKUP_KEY;
 
         return new CursorLoader(
                 mContext,  // Context
@@ -80,6 +79,13 @@
     @Override
     public void onLoadFinished(Loader<Cursor> arg0, Cursor cursor) {
         TextView tv  = (TextView) ((Activity)mContext).findViewById(R.id.sample_output);
+        if(tv == null) {
+            Log.e(TAG, "TextView is null?!");
+        } else if (mContext == null) {
+            Log.e(TAG, "Context is null?");
+        } else {
+            Log.e(TAG, "Nothing is null?!");
+        }
 
         // Reset text in case of a previous query
         tv.setText(mContext.getText(R.string.intro_message) + "\n\n");
@@ -115,9 +121,9 @@
             // BEGIN_INCLUDE(retrieve_data)
             // The data type can be determined using the mime type column.
             String mimeType = cursor.getString(typeColumnIndex);
-            if (mimeType.equals(ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE)) {
+            if (mimeType.equals(CommonDataKinds.Phone.CONTENT_ITEM_TYPE)) {
                 tv.append("\tPhone Number: " + cursor.getString(phoneColumnIndex) + "\n");
-            } else if (mimeType.equals(ContactsContract.CommonDataKinds.Email.CONTENT_ITEM_TYPE)) {
+            } else if (mimeType.equals(CommonDataKinds.Email.CONTENT_ITEM_TYPE)) {
                 tv.append("\tEmail Address: " + cursor.getString(emailColumnIndex) + "\n");
             }
             // END_INCLUDE(retrieve_data)
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/MainActivity.java b/content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/MainActivity.java
similarity index 98%
rename from content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/MainActivity.java
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/MainActivity.java
index 9448ada..b8b074e 100644
--- a/content/contacts/BasicContactables/BasicContactables/src/main/java/com/example/android/basiccontactables/MainActivity.java
+++ b/content/contacts/BasicContactables/BasicContactablesSample/src/main/java/com/example/android/basiccontactables/MainActivity.java
@@ -37,7 +37,7 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
 
         if (getIntent() != null) {
             handleIntent(getIntent());
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-hdpi/ic_search_api_holo_light.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-hdpi/ic_search_api_holo_light.png
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-hdpi/ic_search_api_holo_light.png
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-hdpi/ic_search_api_holo_light.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-mdpi/ic_search_api_holo_light.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-mdpi/ic_search_api_holo_light.png
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-mdpi/ic_search_api_holo_light.png
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-mdpi/ic_search_api_holo_light.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xhdpi/ic_search_api_holo_light.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xhdpi/ic_search_api_holo_light.png
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactables/src/main/res/drawable-xhdpi/ic_search_api_holo_light.png
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xhdpi/ic_search_api_holo_light.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/layout/activity_main.xml b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactables/src/main/res/layout/activity_main.xml
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/layout/sample_main.xml
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/menu/main.xml b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/menu/main.xml
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactables/src/main/res/menu/main.xml
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/menu/main.xml
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/values-v11/styles.xml b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/strings.xml
old mode 100644
new mode 100755
similarity index 85%
rename from content/contacts/BasicContactables/BasicContactables/src/main/res/values-v11/styles.xml
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/strings.xml
index 2ba754c..a499fd2
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/values-v11/styles.xml
+++ b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/strings.xml
@@ -16,5 +16,6 @@
   -->
 
 <resources>
-    <style name="Theme.Base" parent="android:Theme.Holo.Light" />
+    <string name="sample_action">Sample action</string>
+    <string name="search_title">Search Contacts</string>
 </resources>
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/values/styles.xml b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/styles.xml
similarity index 84%
rename from content/contacts/BasicContactables/BasicContactables/src/main/res/values/styles.xml
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/styles.xml
index 1c0e5aa..c3a400d 100644
--- a/content/contacts/BasicContactables/BasicContactables/src/main/res/values/styles.xml
+++ b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/values/styles.xml
@@ -16,17 +16,8 @@
   -->
 
 <resources>
-
-    <!-- Activity themes -->
-
-    <style name="Theme.Base" parent="android:Theme.Light" />
-
-    <style name="Theme.Sample" parent="Theme.Base" />
-
     <!-- Widget styling -->
 
-    <style name="Widget" />
-
     <style name="Widget.SampleOutput">
         <item name="android:padding">@dimen/margin_medium</item>
         <item name="android:textAppearance">?android:textAppearanceMedium</item>
diff --git a/content/contacts/BasicContactables/BasicContactables/src/main/res/xml/searchable.xml b/content/contacts/BasicContactables/BasicContactablesSample/src/main/res/xml/searchable.xml
similarity index 100%
rename from content/contacts/BasicContactables/BasicContactables/src/main/res/xml/searchable.xml
rename to content/contacts/BasicContactables/BasicContactablesSample/src/main/res/xml/searchable.xml
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/tests/AndroidManifest.xml b/content/contacts/BasicContactables/BasicContactablesSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactablesSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/content/contacts/BasicContactables/BasicContactablesSample/tests/src/com/example/android/basiccontactables/tests/SampleTests.java b/content/contacts/BasicContactables/BasicContactablesSample/tests/src/com/example/android/basiccontactables/tests/SampleTests.java
new file mode 100644
index 0000000..dd48bf2
--- /dev/null
+++ b/content/contacts/BasicContactables/BasicContactablesSample/tests/src/com/example/android/basiccontactables/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.basiccontactables.tests;
+
+import com.example.android.basiccontactables.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for BasicContactables sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private BasicContactablesFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (BasicContactablesFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/content/contacts/BasicContactables/README.txt b/content/contacts/BasicContactables/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/content/contacts/BasicContactables/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/content/contacts/BasicContactables/_index.jd b/content/contacts/BasicContactables/_index.jd
new file mode 100644
index 0000000..3bab7ea
--- /dev/null
+++ b/content/contacts/BasicContactables/_index.jd
@@ -0,0 +1,11 @@
+page.tags="BasicContactables"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+    Welcome to Basic Contactables Query sample!\n\n
+    Use the search box to enter a term, and find matching contacts in
+    Android\'s contact database!
+
+</p>
diff --git a/content/contacts/BasicContactables/build.gradle b/content/contacts/BasicContactables/build.gradle
index 036abc8..ffb5c2f 100644
--- a/content/contacts/BasicContactables/build.gradle
+++ b/content/contacts/BasicContactables/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/content/contacts/BasicContactables/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to content/contacts/BasicContactables/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/content/contacts/BasicContactables/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties b/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties
+++ b/content/contacts/BasicContactables/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/content/contacts/BasicContactables/settings.gradle b/content/contacts/BasicContactables/settings.gradle
index 111067c..5fec49c 100644
--- a/content/contacts/BasicContactables/settings.gradle
+++ b/content/contacts/BasicContactables/settings.gradle
@@ -1 +1,4 @@
-include ':BasicContactables'
+
+
+
+include 'BasicContactablesSample'
diff --git a/content/contacts/BasicContactables/template-params.xml b/content/contacts/BasicContactables/template-params.xml
new file mode 100644
index 0000000..c3e0ce0
--- /dev/null
+++ b/content/contacts/BasicContactables/template-params.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>BasicContactables</name>
+    <group>NoGroup</group>
+    <package>com.example.android.basiccontactables</package>
+
+
+
+    <!-- change minSdk if needed-->
+    <minSdk>18</minSdk>
+
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample demonstrates how to use the Contactables table to search for contacts.
+            \n\nQuery strings sent to the Contactables table will match both contact names and phone numbers,
+            reducing the number of queries your application needs to use when searching the contacts database!
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/content/documentsUi/StorageClient/StorageClientSample/.gitignore b/content/documentsUi/StorageClient/StorageClientSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/content/documentsUi/StorageClient/StorageClientSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/README-singleview.txt b/content/documentsUi/StorageClient/StorageClientSample/README-singleview.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/README-singleview.txt
copy to content/documentsUi/StorageClient/StorageClientSample/README-singleview.txt
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/content/documentsUi/StorageClient/StorageClientSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to content/documentsUi/StorageClient/StorageClientSample/proguard-project.txt
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml b/content/documentsUi/StorageClient/StorageClientSample/src/main/AndroidManifest.xml
similarity index 62%
copy from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
copy to content/documentsUi/StorageClient/StorageClientSample/src/main/AndroidManifest.xml
index 7e9a861..d35a4ec 100644
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
+++ b/content/documentsUi/StorageClient/StorageClientSample/src/main/AndroidManifest.xml
@@ -1,11 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+     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,
@@ -14,23 +15,20 @@
  limitations under the License.
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.actionbarcompat.listpopupmenu"
+    package="com.example.android.storageclient"
     android:versionCode="1"
     android:versionName="1.0">
 
-    <!-- ActionBarCompat provides an implementation of Popup Menu from API v7 onwards -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
+    <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19" />
 
-    <application
-        android:icon="@drawable/ic_launcher"
+    <application android:allowBackup="true"
         android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat"
-        android:allowBackup="true">
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/AppTheme">
 
-        <activity android:name=".MainActivity">
-            <!-- Launcher Intent filter -->
+        <activity android:name=".MainActivity"
+                  android:label="@string/app_name"
+                  android:uiOptions="splitActionBarWhenNarrow">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
@@ -38,4 +36,5 @@
         </activity>
     </application>
 
-</manifest>
\ No newline at end of file
+
+</manifest>
diff --git a/content/documentsUi/StorageClient/StorageClientSample/src/main/java/com/example/android/storageclient/StorageClientFragment.java b/content/documentsUi/StorageClient/StorageClientSample/src/main/java/com/example/android/storageclient/StorageClientFragment.java
new file mode 100644
index 0000000..7f9f73e
--- /dev/null
+++ b/content/documentsUi/StorageClient/StorageClientSample/src/main/java/com/example/android/storageclient/StorageClientFragment.java
@@ -0,0 +1,255 @@
+/*
+* Copyright (C) 2012 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.storageclient;
+
+import android.app.Activity;
+import android.app.Dialog;
+import android.content.Intent;
+import android.database.Cursor;
+import android.graphics.Bitmap;
+import android.graphics.BitmapFactory;
+import android.net.Uri;
+import android.os.AsyncTask;
+import android.os.Bundle;
+import android.os.ParcelFileDescriptor;
+import android.provider.OpenableColumns;
+import android.support.v4.app.DialogFragment;
+import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
+import android.view.MenuItem;
+import android.view.Window;
+import android.widget.ImageView;
+
+import com.example.android.common.logger.Log;
+
+import java.io.FileDescriptor;
+import java.io.IOException;
+
+public class StorageClientFragment extends Fragment {
+
+    // A request code's purpose is to match the result of a "startActivityForResult" with
+    // the type of the original request.  Choose any value.
+    private static final int READ_REQUEST_CODE = 1337;
+
+    public static final String TAG = "StorageClientFragment";
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setHasOptionsMenu(true);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        if (item.getItemId() == R.id.sample_action) {
+            performFileSearch();
+        }
+        return true;
+    }
+
+    /**
+     * Fires an intent to spin up the "file chooser" UI and select an image.
+     */
+    public void performFileSearch() {
+
+        // BEGIN_INCLUDE (use_open_document_intent)
+        // ACTION_OPEN_DOCUMENT is the intent to choose a file via the system's file browser.
+        Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
+
+        // Filter to only show results that can be "opened", such as a file (as opposed to a list
+        // of contacts or timezones)
+        intent.addCategory(Intent.CATEGORY_OPENABLE);
+
+        // Filter to show only images, using the image MIME data type.
+        // If one wanted to search for ogg vorbis files, the type would be "audio/ogg".
+        // To search for all documents available via installed storage providers, it would be
+        // "*/*".
+        intent.setType("image/*");
+
+        startActivityForResult(intent, READ_REQUEST_CODE);
+        // END_INCLUDE (use_open_document_intent)
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode, Intent resultData) {
+        Log.i(TAG, "Received an \"Activity Result\"");
+        // BEGIN_INCLUDE (parse_open_document_response)
+        // The ACTION_OPEN_DOCUMENT intent was sent with the request code READ_REQUEST_CODE.
+        // If the request code seen here doesn't match, it's the response to some other intent,
+        // and the below code shouldn't run at all.
+
+        if (requestCode == READ_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
+            // The document selected by the user won't be returned in the intent.
+            // Instead, a URI to that document will be contained in the return intent
+            // provided to this method as a parameter.  Pull that uri using "resultData.getData()"
+            Uri uri = null;
+            if (resultData != null) {
+                uri = resultData.getData();
+                Log.i(TAG, "Uri: " + uri.toString());
+                showImage(uri);
+            }
+            // END_INCLUDE (parse_open_document_response)
+        }
+    }
+
+    /**
+     * Given the URI of an image, shows it on the screen using a DialogFragment.
+     *
+     * @param uri the Uri of the image to display.
+     */
+    public void showImage(Uri uri) {
+        // BEGIN_INCLUDE (create_show_image_dialog)
+        if (uri != null) {
+            // Since the URI is to an image, create and show a DialogFragment to display the
+            // image to the user.
+            FragmentManager fm = getActivity().getSupportFragmentManager();
+            ImageDialogFragment imageDialog = new ImageDialogFragment(uri);
+            imageDialog.show(fm, "image_dialog");
+        }
+        // END_INCLUDE (create_show_image_dialog)
+    }
+
+    /**
+     * Grabs metadata for a document specified by URI, logs it to the screen.
+     *
+     * @param uri The uri for the document whose metadata should be printed.
+     */
+    public void dumpImageMetaData(Uri uri) {
+        // BEGIN_INCLUDE (dump_metadata)
+
+        // The query, since it only applies to a single document, will only return one row.
+        // no need to filter, sort, or select fields, since we want all fields for one
+        // document.
+        Cursor cursor = getActivity().getContentResolver()
+                .query(uri, null, null, null, null, null);
+
+        try {
+        // moveToFirst() returns false if the cursor has 0 rows.  Very handy for
+        // "if there's anything to look at, look at it" conditionals.
+            if (cursor != null && cursor.moveToFirst()) {
+
+                // Note it's called "Display Name".  This is provider-specific, and
+                // might not necessarily be the file name.
+                String displayName = cursor.getString(
+                        cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));
+                Log.i(TAG, "Display Name: " + displayName);
+
+                int sizeIndex = cursor.getColumnIndex(OpenableColumns.SIZE);
+                // If the size is unknown, the value stored is null.  But since an int can't be
+                // null in java, the behavior is implementation-specific, which is just a fancy
+                // term for "unpredictable".  So as a rule, check if it's null before assigning
+                // to an int.  This will happen often:  The storage API allows for remote
+                // files, whose size might not be locally known.
+                String size = null;
+                if (!cursor.isNull(sizeIndex)) {
+                    // Technically the column stores an int, but cursor.getString will do the
+                    // conversion automatically.
+                    size = cursor.getString(sizeIndex);
+                } else {
+                    size = "Unknown";
+                }
+                Log.i(TAG, "Size: " + size);
+            }
+        } finally {
+            cursor.close();
+        }
+        // END_INCLUDE (dump_metadata)
+    }
+
+    /**
+     * DialogFragment which displays an image, given a URI.
+     */
+    private class ImageDialogFragment extends DialogFragment {
+        private Dialog mDialog;
+        private Uri mUri;
+
+        public ImageDialogFragment(Uri uri) {
+            super();
+            mUri = uri;
+        }
+
+        /** Create a Bitmap from the URI for that image and return it.
+         *
+         * @param uri the Uri for the image to return.
+         */
+        private Bitmap getBitmapFromUri(Uri uri) {
+            ParcelFileDescriptor parcelFileDescriptor = null;
+            try {
+                parcelFileDescriptor =
+                        getActivity().getContentResolver().openFileDescriptor(uri, "r");
+                FileDescriptor fileDescriptor = parcelFileDescriptor.getFileDescriptor();
+                Bitmap image = BitmapFactory.decodeFileDescriptor(fileDescriptor);
+                parcelFileDescriptor.close();
+                return image;
+            } catch (Exception e) {
+                Log.e(TAG, "Failed to load image.", e);
+                return null;
+            } finally {
+                try {
+                    if (parcelFileDescriptor != null) {
+                        parcelFileDescriptor.close();
+                    }
+                } catch (IOException e) {
+                    e.printStackTrace();
+                    Log.e(TAG, "Error closing ParcelFile Descriptor");
+                }
+            }
+        }
+
+        @Override
+        public Dialog onCreateDialog(Bundle savedInstanceState) {
+            mDialog = super.onCreateDialog(savedInstanceState);
+            // To optimize for the "lightbox" style layout.  Since we're not actually displaying a
+            // title, remove the bar along the top of the fragment where a dialog title would
+            // normally go.
+            mDialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
+            final ImageView imageView = new ImageView(getActivity());
+            mDialog.setContentView(imageView);
+
+            // BEGIN_INCLUDE (show_image)
+            // Loading the image is going to require some sort of I/O, which must occur off the UI
+            // thread.  Changing the ImageView to display the image must occur ON the UI thread.
+            // The easiest way to divide up this labor is with an AsyncTask.  The doInBackground
+            // method will run in a separate thread, but onPostExecute will run in the main
+            // UI thread.
+            AsyncTask<Uri, Void, Bitmap> imageLoadAsyncTask = new AsyncTask<Uri, Void, Bitmap>() {
+                @Override
+                protected Bitmap doInBackground(Uri... uris) {
+                    dumpImageMetaData(uris[0]);
+                    return getBitmapFromUri(uris[0]);
+                }
+
+                @Override
+                protected void onPostExecute(Bitmap bitmap) {
+                    imageView.setImageBitmap(bitmap);
+                }
+            };
+            imageLoadAsyncTask.execute(mUri);
+            // END_INCLUDE (show_image)
+
+            return mDialog;
+        }
+
+        @Override
+        public void onStop() {
+            super.onStop();
+            if (getDialog() != null) {
+                getDialog().dismiss();
+            }
+        }
+    }
+}
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to content/documentsUi/StorageClient/StorageClientSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/content/documentsUi/StorageClient/StorageClientSample/tests/AndroidManifest.xml b/content/documentsUi/StorageClient/StorageClientSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..fc9405b
--- /dev/null
+++ b/content/documentsUi/StorageClient/StorageClientSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="19"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/content/documentsUi/StorageClient/StorageClientSample/tests/src/com/example/android/storageclient/tests/SampleTests.java b/content/documentsUi/StorageClient/StorageClientSample/tests/src/com/example/android/storageclient/tests/SampleTests.java
new file mode 100644
index 0000000..5ed779a
--- /dev/null
+++ b/content/documentsUi/StorageClient/StorageClientSample/tests/src/com/example/android/storageclient/tests/SampleTests.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.
+*/
+/*
+* 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.storageclient.tests;
+
+import com.example.android.storageclient.*;
+
+import android.net.Uri;
+import android.support.v4.app.FragmentManager;
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for StorageClient sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private StorageClientFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (StorageClientFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+     * Test if the metadata dump handles an invalid URI without blowing up.
+     */
+    public void testDumpMetadataInvalidUri() {
+        Uri uri = Uri.parse("content://HAHADOESNTEXIST");
+        mTestFragment.dumpImageMetaData(uri);
+    }
+}
\ No newline at end of file
diff --git a/content/documentsUi/StorageClient/build.gradle b/content/documentsUi/StorageClient/build.gradle
new file mode 100644
index 0000000..c7f6491
--- /dev/null
+++ b/content/documentsUi/StorageClient/build.gradle
@@ -0,0 +1,8 @@
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
+}
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/content/documentsUi/StorageClient/buildSrc/build.gradle
similarity index 64%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to content/documentsUi/StorageClient/buildSrc/build.gradle
index 8c294c2..7cebf71 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/content/documentsUi/StorageClient/buildSrc/build.gradle
@@ -8,7 +8,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.jar b/content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
copy from connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.jar
copy to content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties b/content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.properties
similarity index 80%
copy from connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
copy to content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
+++ b/content/documentsUi/StorageClient/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/connectivity/network/BasicNetworkDemo/gradlew b/content/documentsUi/StorageClient/gradlew
similarity index 100%
copy from connectivity/network/BasicNetworkDemo/gradlew
copy to content/documentsUi/StorageClient/gradlew
diff --git a/connectivity/network/BasicNetworkDemo/gradlew.bat b/content/documentsUi/StorageClient/gradlew.bat
similarity index 100%
copy from connectivity/network/BasicNetworkDemo/gradlew.bat
copy to content/documentsUi/StorageClient/gradlew.bat
diff --git a/content/documentsUi/StorageClient/settings.gradle b/content/documentsUi/StorageClient/settings.gradle
new file mode 100644
index 0000000..73cfad8
--- /dev/null
+++ b/content/documentsUi/StorageClient/settings.gradle
@@ -0,0 +1 @@
+include 'StorageClientSample'
diff --git a/content/documentsUi/StorageClient/template-params.xml b/content/documentsUi/StorageClient/template-params.xml
new file mode 100644
index 0000000..24bd071
--- /dev/null
+++ b/content/documentsUi/StorageClient/template-params.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<sample>
+    <name>StorageClient</name>
+    <package>com.example.android.storageclient</package>
+    <group>NoGroup</group>
+    <!-- change minSdk if needed-->
+    <minSdk>4</minSdk>
+    <compileSdkVersion>19</compileSdkVersion>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            Using the OPEN_DOCUMENT intent, a client app can access a list of Document Providers
+            on the device, and choose a file from any of them.
+            \n\nTo demonstrate this, click the button below to open up the Storage Access Framework
+            interface, and choose an image on your device.  It will be displayed in this app.
+            ]]>
+        </intro>
+        <sample_action>Show Me The Image</sample_action>
+    </strings>
+
+    <template src="base"/>
+    <template src="SingleView"/>
+    <common src="logger"/>
+    <common src="activities"/>
+
+</sample>
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/build.gradle b/content/multiuser/AppRestrictions/AppRestrictions/build.gradle
deleted file mode 100644
index 9f4459b..0000000
--- a/content/multiuser/AppRestrictions/AppRestrictions/build.gradle
+++ /dev/null
@@ -1,6 +0,0 @@
-apply plugin: 'android'
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/AndroidManifest.xml b/content/multiuser/AppRestrictions/AppRestrictions/src/main/AndroidManifest.xml
deleted file mode 100644
index dd9fc09..0000000
--- a/content/multiuser/AppRestrictions/AppRestrictions/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?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"
-          android:versionCode="1"
-          android:versionName="1"
-          package="com.example.android.apprestrictions">
-
-    <uses-sdk android:minSdkVersion="18" />
-
-    <application android:label="@string/app_name"
-                 android:icon="@drawable/ic_launcher">
-
-        <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="CustomRestrictionsActivity"
-                  android:label="@string/restrictions_activity_label" />
-
-        <receiver android:name="GetRestrictionsReceiver">
-            <intent-filter>
-                <action android:name="android.intent.action.GET_RESTRICTION_ENTRIES" />
-            </intent-filter>
-        </receiver>
-    </application>
-</manifest>
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/.gitignore b/content/multiuser/AppRestrictions/AppRestrictionsSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/content/multiuser/AppRestrictions/AppRestrictionsSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/content/multiuser/AppRestrictions/AppRestrictionsSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to content/multiuser/AppRestrictions/AppRestrictionsSample/proguard-project.txt
diff --git a/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/AndroidManifest.xml b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..b492bbf
--- /dev/null
+++ b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/AndroidManifest.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.apprestrictions"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <uses-sdk android:minSdkVersion="18" />
+
+    <application android:label="@string/app_name"
+        android:icon="@drawable/ic_launcher">
+
+        <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="CustomRestrictionsActivity"
+            android:label="@string/restrictions_activity_label" />
+
+        <receiver android:name="GetRestrictionsReceiver">
+            <intent-filter>
+                <action android:name="android.intent.action.GET_RESTRICTION_ENTRIES" />
+            </intent-filter>
+        </receiver>
+    </application>
+
+</manifest>
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/CustomRestrictionsActivity.java b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/CustomRestrictionsActivity.java
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/CustomRestrictionsActivity.java
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/CustomRestrictionsActivity.java
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/CustomRestrictionsFragment.java
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/GetRestrictionsReceiver.java
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/MainActivity.java b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/MainActivity.java
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/java/com/example/android/apprestrictions/MainActivity.java
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/java/com/example/android/apprestrictions/MainActivity.java
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-hdpi/ic_launcher.png b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-hdpi/ic_launcher.png
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-mdpi/ic_launcher.png b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-mdpi/ic_launcher.png
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-xhdpi/ic_launcher.png b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-xhdpi/ic_launcher.png
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-xxhdpi/ic_launcher.png b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/layout/main.xml b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/layout/main.xml
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/res/layout/main.xml
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/layout/main.xml
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/values/strings.xml b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/values/strings.xml
similarity index 97%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/res/values/strings.xml
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/values/strings.xml
index 2dac3b1..534edf0 100644
--- a/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/values/strings.xml
+++ b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/values/strings.xml
@@ -14,7 +14,6 @@
      limitations under the License.
 -->
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_name">App Restrictions Demo</string>
     <string name="restrictions_activity_label">Custom app restrictions</string>
     <string name="boolean_entry_title">Test boolean type</string>
     <string name="choice_entry_title">Test choice type</string>
diff --git a/content/multiuser/AppRestrictions/AppRestrictions/src/main/res/xml/custom_prefs.xml b/content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/xml/custom_prefs.xml
similarity index 100%
rename from content/multiuser/AppRestrictions/AppRestrictions/src/main/res/xml/custom_prefs.xml
rename to content/multiuser/AppRestrictions/AppRestrictionsSample/src/main/res/xml/custom_prefs.xml
diff --git a/content/multiuser/AppRestrictions/build.gradle b/content/multiuser/AppRestrictions/build.gradle
index 036abc8..ffb5c2f 100644
--- a/content/multiuser/AppRestrictions/build.gradle
+++ b/content/multiuser/AppRestrictions/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/content/multiuser/AppRestrictions/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to content/multiuser/AppRestrictions/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/content/multiuser/AppRestrictions/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/content/multiuser/AppRestrictions/gradle/wrapper/gradle-wrapper.properties b/content/multiuser/AppRestrictions/gradle/wrapper/gradle-wrapper.properties
index 5c22dec..861eddc 100644
--- a/content/multiuser/AppRestrictions/gradle/wrapper/gradle-wrapper.properties
+++ b/content/multiuser/AppRestrictions/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/content/multiuser/AppRestrictions/settings.gradle b/content/multiuser/AppRestrictions/settings.gradle
index 41f2d03..02aef49 100644
--- a/content/multiuser/AppRestrictions/settings.gradle
+++ b/content/multiuser/AppRestrictions/settings.gradle
@@ -1 +1,4 @@
-include ':AppRestrictions'
+
+
+
+include 'AppRestrictionsSample'
diff --git a/content/multiuser/AppRestrictions/template-params.xml b/content/multiuser/AppRestrictions/template-params.xml
new file mode 100644
index 0000000..5fafd3b
--- /dev/null
+++ b/content/multiuser/AppRestrictions/template-params.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>AppRestrictions</name>
+    <group>Content</group>
+    <package>com.example.android.apprestrictions</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>18</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample demonstrates the use of the App Restriction feature, which is available on
+            Android 4.3 and above tablet device with the multiuser feature.
+
+            When launched under the primary User account, you can toggle between standard app restriction
+            types and custom.  When launched under a restricted profile, this activity displays app
+            restriction settings, if available.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+
+</sample>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/_index.jd b/input/gestures/BasicGestureDetect/BasicGestureDetect/_index.jd
deleted file mode 100644
index db0461b..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/_index.jd
+++ /dev/null
@@ -1,6 +0,0 @@
-page.tags="gestures", "motion event"
-sample.group=Input
-@jd:body
-
-<p>Example code that shows how to handle gestures in apps and games.</p>
-
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/build.gradle b/input/gestures/BasicGestureDetect/BasicGestureDetect/build.gradle
deleted file mode 100644
index 10fb811..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/libs/android-support-v4.jar b/input/gestures/BasicGestureDetect/BasicGestureDetect/libs/android-support-v4.jar
deleted file mode 100644
index 428bdbc..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/libs/android-support-v4.jar
+++ /dev/null
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/AndroidManifest.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/AndroidManifest.xml
deleted file mode 100755
index 9c6ec99..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
-  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.basicgesturedetect"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="8" 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"
-            android:uiOptions="splitActionBarWhenNarrow">
-
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-</manifest>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/GestureListener.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/GestureListener.java
deleted file mode 100644
index 2e2921d..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/GestureListener.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.basicgesturedetect;
-
-import android.view.GestureDetector;
-import android.view.MotionEvent;
-
-import com.example.android.common.logger.Log;
-
-public class GestureListener extends GestureDetector.SimpleOnGestureListener {
-
-    public static final String TAG = "GestureListener";
-
-    // BEGIN_INCLUDE(init_gestureListener)
-    @Override
-    public boolean onSingleTapUp(MotionEvent e) {
-        // Up motion completing a single tap occurred.
-        Log.i(TAG, "Single Tap Up");
-        return false;
-    }
-
-    @Override
-    public void onLongPress(MotionEvent e) {
-        // Touch has been long enough to indicate a long press.
-        // Does not indicate motion is complete yet (no up event necessarily)
-        Log.i(TAG, "Long Press");
-    }
-
-    @Override
-    public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
-    float distanceY) {
-        // User attempted to scroll
-        Log.i(TAG, "Scroll");
-        return false;
-    }
-
-    @Override
-    public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
-    float velocityY) {
-        // Fling event occurred.  Notification of this one happens after an "up" event.
-        Log.i(TAG, "Fling");
-        return false;
-    }
-
-    @Override
-    public void onShowPress(MotionEvent e) {
-        // User performed a down event, and hasn't moved yet.
-        Log.i(TAG, "Show Press");
-    }
-
-    @Override
-    public boolean onDown(MotionEvent e) {
-        // "Down" event - User touched the screen.
-        Log.i(TAG, "Down");
-        return false;
-    }
-
-    @Override
-    public boolean onDoubleTap(MotionEvent e) {
-        // User tapped the screen twice.
-        Log.i(TAG, "Double tap");
-        return false;
-    }
-
-    @Override
-    public boolean onDoubleTapEvent(MotionEvent e) {
-        // Since double-tap is actually several events which are considered one aggregate
-        // gesture, there's a separate callback for an individual event within the doubletap
-        // occurring.  This occurs for down, up, and move.
-        Log.i(TAG, "Event within double tap");
-        return false;
-    }
-
-    @Override
-    public boolean onSingleTapConfirmed(MotionEvent e) {
-        // A confirmed single-tap event has occurred.  Only called when the detector has
-        // determined that the first tap stands alone, and is not part of a double tap.
-        Log.i(TAG, "Single tap confirmed");
-        return false;
-    }
-    // END_INCLUDE(init_gestureListener)
-}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/LogFragment.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/LogFragment.java
deleted file mode 100644
index 849edac..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/LogFragment.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright 2013 Google Inc. All Rights Reserved.
-
-package com.example.android.basicgesturedetect;
-
-import com.example.android.common.logger.LogView;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.text.Editable;
-import android.text.TextWatcher;
-
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ScrollView;
-
-/**
- * Simple fraggment which contains a LogView and uses is to output log data it receives
- * through the LogNode interface.
- */
-public class LogFragment extends Fragment {
-
-    private LogView mLogView;
-
-    public LogFragment() {}
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-
-        View result = inflater.inflate(R.layout.log_fragment, container, false);
-
-        mLogView = (LogView) result.findViewById(R.id.sample_output);
-
-        // Wire up so when the text changes, the view scrolls down.
-        final ScrollView scrollView =
-                ((ScrollView) result.findViewById(R.id.log_scroll));
-
-        mLogView.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
-
-            @Override
-            public void onTextChanged(CharSequence s, int start, int before, int count) {}
-
-            @Override
-            public void afterTextChanged(Editable s) {
-                scrollView.fullScroll(ScrollView.FOCUS_DOWN);
-            }
-        });
-
-        return result;
-    }
-
-    public LogView getLogView() {
-        return mLogView;
-    }
-}
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/MainActivity.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/MainActivity.java
deleted file mode 100755
index 4654ac9..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/basicgesturedetect/MainActivity.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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.basicgesturedetect;
-
-import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
-import android.util.TypedValue;
-import android.view.GestureDetector;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.MotionEvent;
-import android.view.View;
-
-import com.example.android.common.logger.LogWrapper;
-import com.example.android.common.logger.Log;
-import com.example.android.common.widgets.SimpleTextFragment;
-import com.example.android.common.logger.MessageOnlyLogFilter;
-
-/**
- * Sample application demonstrating how to use GestureDetector go detect when a user performs
- * a gesture that's recognized by the framework.  This example uses SimpleGestureDetector.  If you
- * want to detect
- * as well as customize that shortcut with metadata to send along to the application it activates.
- * Code is also included for removing your shortcut from the homescreen, for situations where that
- * is necessary (for instance, removing a shortcut to some data when that data is deleted from your
- * app).
- */
-public class MainActivity extends FragmentActivity {
-
-    public static final String TAG = "Basic Gesture Detector";
-
-    // Reference to the fragment showing events, so we can clear it with a button as necessary.
-    private LogFragment mLogFragment;
-
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
-
-        SimpleTextFragment actionFragment = (SimpleTextFragment)
-                    getSupportFragmentManager().findFragmentById(R.id.intro_fragment);
-        actionFragment.setText(R.string.intro_message);
-        actionFragment.getView().setClickable(true);
-        actionFragment.getView().setFocusable(true);
-        actionFragment.getTextView().setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16.0f);
-
-
-        // BEGIN_INCLUDE(init_detector)
-
-        // First create the GestureListener that will include all our callbacks.
-        // Then create the GestureDetector, which takes that listener as an argument.
-        GestureDetector.SimpleOnGestureListener gestureListener = getGestureListener();
-        final GestureDetector gd = new GestureDetector(this, gestureListener);
-
-        /* For the view where gestures will occur, create an onTouchListener that sends
-         * all motion events to the gesture detector.  When the gesture detector
-         * actually detects an event, it will use the callbacks you created in the
-         * SimpleOnGestureListener to alert your application.
-        */
-
-        actionFragment.getView().setOnTouchListener(new View.OnTouchListener() {
-            @Override
-            public boolean onTouch(View view, MotionEvent motionEvent) {
-                gd.onTouchEvent(motionEvent);
-                return false;
-            }
-        });
-        // END_INCLUDE(init_detector)
-
-        initializeLogging();
-    }
-
-    /** Create a gesture listener which will be attached to the GestureDetector.
-     *  This listener is where you can write all your callbacks for when certain events occur.
-     * @return The listener your GestureDetector will use to inform your application when
-     * the supported gestures occur.
-     */
-    public GestureDetector.SimpleOnGestureListener getGestureListener() {
-        return new GestureListener();
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        getMenuInflater().inflate(R.menu.main, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case R.id.sample_action:
-                // Clears the log fragment when clicked.
-                mLogFragment.getLogView().setText("");
-                return true;
-        }
-        return false;
-    }
-
-    /** Create a chain of targets that will receive log data */
-    public void initializeLogging() {
-        // Wraps Android's native log framework.
-        LogWrapper logWrapper = new LogWrapper();
-        // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
-        Log.setLogNode(logWrapper);
-
-        // Filter strips out everything except the message text.
-        MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
-        logWrapper.setNext(msgFilter);
-
-        // On screen logging via a fragment with a TextView.
-        mLogFragment =
-                (LogFragment) getSupportFragmentManager().findFragmentById(R.id.log_fragment);
-        msgFilter.setNext(mLogFragment.getLogView());
-
-        Log.i(TAG, "Ready");
-    }
-}
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/Log.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/Log.java
deleted file mode 100644
index a87f299..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/Log.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * 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.common.logger;
-
-/**
- * Helper class for a list (or tree) of LoggerNodes.
- *
- * <p>When this is set as the head of the list,
- * an instance of it can function as a drop-in replacement for {@link android.util.Log}.
- * Most of the methods in this class server only to map a method call in Log to its equivalent
- * in LogNode.</p>
- */
-public class Log {
-    // Grab the native values from Android's native logging facilities,
-    // to make for easy migration and interop.
-    public static final int NONE = -1;
-    public static final int VERBOSE = android.util.Log.VERBOSE;
-    public static final int DEBUG = android.util.Log.DEBUG;
-    public static final int INFO = android.util.Log.INFO;
-    public static final int WARN = android.util.Log.WARN;
-    public static final int ERROR = android.util.Log.ERROR;
-    public static final int ASSERT = android.util.Log.ASSERT;
-
-    // Stores the beginning of the LogNode topology.
-    private static LogNode mLogNode;
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public static LogNode getLogNode() {
-        return mLogNode;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to.
-     */
-    public static void setLogNode(LogNode node) {
-        mLogNode = node;
-    }
-
-    /**
-     * Instructs the LogNode to print the log data provided. Other LogNodes can
-     * be chained to the end of the LogNode as desired.
-     *
-     * @param priority Log level of the data being logged. Verbose, Error, etc.
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void println(int priority, String tag, String msg, Throwable tr) {
-        if (mLogNode != null) {
-            mLogNode.println(priority, tag, msg, tr);
-        }
-    }
-
-    /**
-     * Instructs the LogNode to print the log data provided. Other LogNodes can
-     * be chained to the end of the LogNode as desired.
-     *
-     * @param priority Log level of the data being logged. Verbose, Error, etc.
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     */
-    public static void println(int priority, String tag, String msg) {
-        println(priority, tag, msg, null);
-    }
-
-   /**
-     * Prints a message at VERBOSE priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void v(String tag, String msg, Throwable tr) {
-        println(VERBOSE, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at VERBOSE priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void v(String tag, String msg) {
-        v(tag, msg, null);
-    }
-
-
-    /**
-     * Prints a message at DEBUG priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void d(String tag, String msg, Throwable tr) {
-        println(DEBUG, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at DEBUG priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void d(String tag, String msg) {
-        d(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at INFO priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void i(String tag, String msg, Throwable tr) {
-        println(INFO, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at INFO priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void i(String tag, String msg) {
-        i(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void w(String tag, String msg, Throwable tr) {
-        println(WARN, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void w(String tag, String msg) {
-        w(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void w(String tag, Throwable tr) {
-        w(tag, null, tr);
-    }
-
-    /**
-     * Prints a message at ERROR priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void e(String tag, String msg, Throwable tr) {
-        println(ERROR, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at ERROR priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void e(String tag, String msg) {
-        e(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void wtf(String tag, String msg, Throwable tr) {
-        println(ASSERT, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void wtf(String tag, String msg) {
-        wtf(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void wtf(String tag, Throwable tr) {
-        wtf(tag, null, tr);
-    }
-}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogNode.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogNode.java
deleted file mode 100644
index bc37cab..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogNode.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2012 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.common.logger;
-
-/**
- * Basic interface for a logging system that can output to one or more targets.
- * Note that in addition to classes that will output these logs in some format,
- * one can also implement this interface over a filter and insert that in the chain,
- * such that no targets further down see certain data, or see manipulated forms of the data.
- * You could, for instance, write a "ToHtmlLoggerNode" that just converted all the log data
- * it received to HTML and sent it along to the next node in the chain, without printing it
- * anywhere.
- */
-public interface LogNode {
-
-    /**
-     * Instructs first LogNode in the list to print the log data provided.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public void println(int priority, String tag, String msg, Throwable tr);
-
-}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogView.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogView.java
deleted file mode 100644
index d86a88b..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogView.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package com.example.android.common.logger;
-
-import android.content.Context;
-import android.text.method.ScrollingMovementMethod;
-import android.util.*;
-import android.widget.TextView;
-
-/**
- * Created by alexlucas on 6/4/13.
- */
-
-
-public class LogView extends TextView implements LogNode {
-
-    public LogView(Context context) {
-        super(context);
-    }
-
-    public LogView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public LogView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-    }
-
-    /**
-     * Formats the log data and prints it out to the LogView.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        String priorityStr = null;
-
-        // For the purposes of this View, we want to print the priority as readable text.
-        switch(priority) {
-            case android.util.Log.VERBOSE:
-                priorityStr = "VERBOSE";
-                break;
-            case android.util.Log.DEBUG:
-                priorityStr = "DEBUG";
-                break;
-            case android.util.Log.INFO:
-                priorityStr = "INFO";
-                break;
-            case android.util.Log.WARN:
-                priorityStr = "WARN";
-                break;
-            case android.util.Log.ERROR:
-                priorityStr = "ERROR";
-                break;
-            case android.util.Log.ASSERT:
-                priorityStr = "ASSERT";
-                break;
-            default:
-                break;
-        }
-
-        // Handily, the Log class has a facility for converting a stack trace into a useable string.
-        String exceptionStr = null;
-        if (tr != null) {
-            exceptionStr = android.util.Log.getStackTraceString(tr);
-        }
-
-        // Take the priority, tag, message, and exception, and concatonate as necessary
-        // into one usable line of text.
-        String outputStr =  "";
-        outputStr = appendIfNotNull(outputStr, priorityStr, "\t");
-        outputStr = appendIfNotNull(outputStr, tag, "\t");
-        outputStr = appendIfNotNull(outputStr, msg, "\t");
-        outputStr = appendIfNotNull(outputStr, exceptionStr, "\t");
-
-        // Actually display the text we just generated within the LogView.
-        appendToLog(outputStr);
-
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /** Takes a string and adds to it, with a seperator, if the bit to be added isn't null. Since
-     * the logger takes so many arguments that might be null, this method helps cut out some of the
-     * agonizing tedium of writing the same 3 lines over and over.
-     * @param sourceStr The String to append to.
-     * @param appendStr The String to append
-     * @param delimiter The String to seperate the source and appendee strings. A tab or comma,
-     *                  for instance.
-     * @return The fully concatonated String
-     */
-    private String appendIfNotNull(String sourceStr, String appendStr, String delimiter) {
-        if (appendStr != null) {
-            if (appendStr.length() == 0) {
-                delimiter = "";
-            }
-            sourceStr += delimiter + appendStr;
-        }
-        return sourceStr;
-    }
-
-    // The next LogNode in the chain.
-    LogNode mNext;
-
-    /** Outputs the string as a new line of log data in the LogView. */
-    public void appendToLog(String s) {
-        append("\n" + s);
-    }
-
-
-}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogWrapper.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogWrapper.java
deleted file mode 100644
index 16a9e7b..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/LogWrapper.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2012 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.common.logger;
-
-import android.util.Log;
-
-/**
- * Helper class which wraps Android's native Log utility in the Logger interface.  This way
- * normal DDMS output can be one of the many targets receiving and outputting logs simultaneously.
- */
-public class LogWrapper implements LogNode {
-
-    // For piping:  The next node to receive Log data after this one has done its work.
-    private LogNode mNext;
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to..
-     */
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /**
-     * Prints data out to the console using Android's native log mechanism.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        // There actually are log methods that don't take a msg parameter.  For now,
-        // if that's the case, just convert null to the empty string and move on.
-        String useMsg = msg;
-        if (useMsg == null) {
-            useMsg = "";
-        }
-
-        // If an exeption was provided, convert that exception to a usable string and attach
-        // it to the end of the msg method.
-        if (tr != null) {
-            msg += "\n" + Log.getStackTraceString(tr);
-        }
-
-        // This is functionally identical to Log.x(tag, useMsg);
-        // For instance, if priority were Log.VERBOSE, this would be the same as Log.v(tag, useMsg)
-        Log.println(priority, tag, useMsg);
-
-        // If this isn't the last node in the chain, move things along.
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
deleted file mode 100644
index 6b72771..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.common.logger;
-
-/**
- * Simple {@link LogNode} filter, removes everything except the message.
- * Useful for situations like on-screen log output where you don't want a lot of metadata displayed,
- * just easy-to-read message updates as they're happening.
- */
-public class MessageOnlyLogFilter implements LogNode {
-
-    LogNode mNext;
-
-    /**
-     * Takes the "next" LogNode as a parameter, to simplify chaining.
-     *
-     * @param next The next LogNode in the pipeline.
-     */
-    public MessageOnlyLogFilter(LogNode next) {
-        mNext = next;
-    }
-
-    public MessageOnlyLogFilter() {
-    }
-
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        if (mNext != null) {
-            getNext().println(Log.NONE, null, msg, null);
-        }
-    }
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to..
-     */
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-}
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/widgets/SimpleTextFragment.java b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/widgets/SimpleTextFragment.java
deleted file mode 100644
index bd51a1c..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/java/com/example/android/common/widgets/SimpleTextFragment.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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.common.widgets;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-/**
- * Simple fragment containing only a TextView.  Used by TextPagerAdapter to create
- * tutorial-style pages for apps.
- */
-public class SimpleTextFragment extends Fragment {
-
-    // Contains the text that will be displayed by this Fragment
-    String mText;
-
-    // Contains a resource ID for the text that will be displayed by this fragment.
-    int mTextId = -1;
-
-    // Keys which will be used to store/retrieve text passed in via setArguments.
-    public static final String TEXT_KEY = "text";
-    public static final String TEXT_ID_KEY = "text_id";
-
-    // For situations where the app wants to modify text at Runtime, exposing the TextView.
-    private TextView mTextView;
-
-    public SimpleTextFragment() {
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-        // Before initializing the textView, check if any arguments were provided via setArguments.
-        processArguments();
-
-        // Create a new TextView and set its text to whatever was provided.
-        mTextView = new TextView(getActivity());
-        mTextView.setGravity(Gravity.CENTER);
-
-        if (mText != null) {
-            mTextView.setText(mText);
-            Log.i("SimpleTextFragment", mText);
-        }
-        return mTextView;
-    }
-
-    public TextView getTextView() {
-        return mTextView;
-    }
-
-    /**
-     * Changes the text for this TextView, according to the resource ID provided.
-     * @param stringId A resource ID representing the text content for this Fragment's TextView.
-     */
-    public void setText(int stringId) {
-        getTextView().setText(getActivity().getString(stringId));
-    }
-
-    /**
-     * Processes the arguments passed into this Fragment via setArguments method.
-     * Currently the method only looks for text or a textID, nothing else.
-     */
-    public void processArguments() {
-        // For most objects we'd handle the multiple possibilities for initialization variables
-        // as multiple constructors.  For Fragments, however, it's customary to use
-        // setArguments / getArguments.
-        if (getArguments() != null) {
-            Bundle args = getArguments();
-            if (args.containsKey(TEXT_KEY)) {
-                mText = args.getString(TEXT_KEY);
-                Log.d("Constructor", "Added Text.");
-            } else if (args.containsKey(TEXT_ID_KEY)) {
-                mTextId = args.getInt(TEXT_ID_KEY);
-                mText = getString(mTextId);
-            }
-        }
-    }
-}
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-hdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100755
index 22ce606..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-mdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100755
index f21e17b..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-xhdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100755
index 64b8059..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-xxhdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100755
index 6b4434a..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/activity_main.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/activity_main.xml
deleted file mode 100755
index 471748f..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  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:orientation="vertical"
-    android:layout_width="fill_parent"
-    android:layout_height="fill_parent">
-    <fragment
-        android:name="com.example.android.common.SimpleTextFragment"
-        android:id="@+id/intro_fragment"
-        android:layout_weight="1"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-    <View
-        android:layout_width="fill_parent"
-        android:layout_height="1dp"
-        android:background="@android:color/darker_gray"/>
-    <fragment
-        android:name="com.example.android.basicgesturedetect.LogFragment"
-        android:id="@+id/log_fragment"
-        android:layout_weight="1"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-</LinearLayout>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/log_fragment.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/log_fragment.xml
deleted file mode 100644
index 6d79548..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/layout/log_fragment.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-  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:id="@+id/log_scroll"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent">
-
-    <com.example.android.common.logger.LogView
-        android:id="@+id/sample_output"
-        style="@style/Log"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:clickable="true"
-        android:focusable="true"
-        android:text=""
-        android:gravity="bottom" />
-</ScrollView>
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/menu/main.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/menu/main.xml
deleted file mode 100644
index d0ffa14..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/menu/main.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-  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/sample_action"
-        android:showAsAction="ifRoom|withText"
-        android:title="@string/clear_text" />
-</menu>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/dimens.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/dimens.xml
deleted file mode 100644
index 886b05f..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/dimens.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<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/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/styles.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/styles.xml
deleted file mode 100644
index ffcbe8a..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw600dp/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-  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.SampleOutput">
-        <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>
-        <item name="android:textAppearance">?android:textAppearanceLarge</item>
-        <item name="android:lineSpacingMultiplier">1.2</item>
-    </style>
-
-</resources>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw720dp-land/dimens.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw720dp-land/dimens.xml
deleted file mode 100644
index 00059fc..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-sw720dp-land/dimens.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<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/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v11/styles.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v11/styles.xml
deleted file mode 100644
index c6c648b..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--
-  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="Theme.Base" parent="android:Theme.Holo.Light" />
-</resources>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v14/styles.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v14/styles.xml
deleted file mode 100644
index a91fd03..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values-v14/styles.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<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/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/dimens.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/dimens.xml
deleted file mode 100644
index 4f69897..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  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_medium">16dp</dimen>
-    <dimen name="margin_huge">64dp</dimen>
-
-</resources>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/strings.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/strings.xml
deleted file mode 100755
index ce1ad02..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<!--
-  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">Basic Gesture Detect</string>
-
-    <string name="intro_message">Welcome to Basic Gesture Detect!
-        In order to try this sample out, try dragging or tapping this text to see what happens!
-    </string>
-
-    <string name="clear_text">Clear Text</string>
-</resources>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/styles.xml b/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/styles.xml
deleted file mode 100644
index 4d9bb98..0000000
--- a/input/gestures/BasicGestureDetect/BasicGestureDetect/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
-  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 thegi 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.Light" />
-
-    <style name="Theme.Sample" parent="Theme.Base" />
-
-    <!-- Widget styling -->
-
-    <style name="Widget" />
-
-    <style name="Widget.SampleOutput">
-        <item name="android:padding">@dimen/margin_medium</item>
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-    <style name="Log" parent="Widget.SampleOutput">
-        <item name="android:typeface">monospace</item>
-    </style>
-
-
-</resources>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/.gitignore b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/README-singleview.txt b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/README-singleview.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/README-singleview.txt
copy to input/gestures/BasicGestureDetect/BasicGestureDetectSample/README-singleview.txt
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to input/gestures/BasicGestureDetect/BasicGestureDetectSample/proguard-project.txt
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/AndroidManifest.xml
similarity index 62%
copy from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
copy to input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/AndroidManifest.xml
index 7e9a861..1d7b3bd 100644
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/AndroidManifest.xml
@@ -1,11 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+     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,
@@ -13,24 +14,24 @@
  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.actionbarcompat.listpopupmenu"
+    package="com.example.android.basicgesturedetect"
     android:versionCode="1"
     android:versionName="1.0">
 
-    <!-- ActionBarCompat provides an implementation of Popup Menu from API v7 onwards -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
+    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" />
 
-    <application
-        android:icon="@drawable/ic_launcher"
+    <application android:allowBackup="true"
         android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat"
-        android:allowBackup="true">
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/AppTheme">
 
-        <activity android:name=".MainActivity">
-            <!-- Launcher Intent filter -->
+        <activity android:name=".MainActivity"
+                  android:label="@string/app_name"
+                  android:uiOptions="splitActionBarWhenNarrow">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
@@ -38,4 +39,5 @@
         </activity>
     </application>
 
-</manifest>
\ No newline at end of file
+
+</manifest>
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/java/com/example/android/basicgesturedetect/BasicGestureDetectFragment.java b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/java/com/example/android/basicgesturedetect/BasicGestureDetectFragment.java
new file mode 100644
index 0000000..820e972
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/java/com/example/android/basicgesturedetect/BasicGestureDetectFragment.java
@@ -0,0 +1,81 @@
+/*
+* 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.basicgesturedetect;
+
+import android.content.Intent;
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import android.view.GestureDetector;
+import android.view.MenuItem;
+import android.view.MotionEvent;
+import android.view.View;
+
+import com.example.android.common.logger.Log;
+import com.example.android.common.logger.LogFragment;
+
+public class BasicGestureDetectFragment extends Fragment{
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setHasOptionsMenu(true);
+    }
+
+    @Override
+    public void onActivityCreated(Bundle savedInstanceState) {
+        super.onActivityCreated(savedInstanceState);
+        View gestureView = getActivity().findViewById(R.id.sample_output);
+        gestureView.setClickable(true);
+        gestureView.setFocusable(true);
+
+        // BEGIN_INCLUDE(init_detector)
+
+        // First create the GestureListener that will include all our callbacks.
+        // Then create the GestureDetector, which takes that listener as an argument.
+        GestureDetector.SimpleOnGestureListener gestureListener = new GestureListener();
+        final GestureDetector gd = new GestureDetector(getActivity(), gestureListener);
+
+        /* For the view where gestures will occur, create an onTouchListener that sends
+         * all motion events to the gesture detector.  When the gesture detector
+         * actually detects an event, it will use the callbacks you created in the
+         * SimpleOnGestureListener to alert your application.
+        */
+
+        gestureView.setOnTouchListener(new View.OnTouchListener() {
+            @Override
+            public boolean onTouch(View view, MotionEvent motionEvent) {
+                gd.onTouchEvent(motionEvent);
+                return false;
+            }
+        });
+        // END_INCLUDE(init_detector)
+    }
+
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        if (item.getItemId() == R.id.sample_action) {
+            clearLog();
+        }
+        return true;
+    }
+
+    public void clearLog() {
+        LogFragment logFragment =  ((LogFragment) getActivity().getSupportFragmentManager()
+                .findFragmentById(R.id.log_fragment));
+        logFragment.getLogView().setText("");
+    }
+}
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to input/gestures/BasicGestureDetect/BasicGestureDetectSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/AndroidManifest.xml b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/src/com/example/android/basicgesturedetect/tests/SampleTests.java b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/src/com/example/android/basicgesturedetect/tests/SampleTests.java
new file mode 100644
index 0000000..e72c22e
--- /dev/null
+++ b/input/gestures/BasicGestureDetect/BasicGestureDetectSample/tests/src/com/example/android/basicgesturedetect/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.basicgesturedetect.tests;
+
+import com.example.android.basicgesturedetect.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for BasicGestureDetect sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private BasicGestureDetectFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (BasicGestureDetectFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/README.txt b/input/gestures/BasicGestureDetect/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/input/gestures/BasicGestureDetect/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/input/gestures/BasicGestureDetect/build.gradle b/input/gestures/BasicGestureDetect/build.gradle
index 036abc8..ffb5c2f 100644
--- a/input/gestures/BasicGestureDetect/build.gradle
+++ b/input/gestures/BasicGestureDetect/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/input/gestures/BasicGestureDetect/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to input/gestures/BasicGestureDetect/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/input/gestures/BasicGestureDetect/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/input/gestures/BasicGestureDetect/gradle/wrapper/gradle-wrapper.properties b/input/gestures/BasicGestureDetect/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..5c22dec 100644
--- a/input/gestures/BasicGestureDetect/gradle/wrapper/gradle-wrapper.properties
+++ b/input/gestures/BasicGestureDetect/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,4 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
diff --git a/input/gestures/BasicGestureDetect/settings.gradle b/input/gestures/BasicGestureDetect/settings.gradle
index 2270ab7..ba7e8c0 100644
--- a/input/gestures/BasicGestureDetect/settings.gradle
+++ b/input/gestures/BasicGestureDetect/settings.gradle
@@ -1 +1,4 @@
-include ':BasicGestureDetect'
+
+
+
+include 'BasicGestureDetectSample'
diff --git a/ui/ImmersiveMode/template-params.xml b/input/gestures/BasicGestureDetect/template-params.xml
similarity index 60%
copy from ui/ImmersiveMode/template-params.xml
copy to input/gestures/BasicGestureDetect/template-params.xml
index 9ee55ae..1feba01 100644
--- a/ui/ImmersiveMode/template-params.xml
+++ b/input/gestures/BasicGestureDetect/template-params.xml
@@ -14,24 +14,26 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<sample>
-    <name>ImmersiveMode</name>
-    <package>com.example.android.immersivemode</package>
-    <compileSdkVersion>"android-KeyLimePie"</compileSdkVersion>
 
-    <!--TODO: change minSdk if needed-->
-    <minSdk>4</minSdk>
+
+
+<sample>
+    <name>BasicGestureDetect</name>
+    <package>com.example.android.basicgesturedetect</package>
+
+
+    <!-- change minSdk if needed-->
+    <minSdk>18</minSdk>
 
 
     <strings>
         <intro>
             <![CDATA[
-            One of the features introduced in KitKat is "immersive mode". Immersive mode gives the
-            user the ability to show/hide the status bar and navigation bar with a swipe.  To try,
-            click the "Toggle immersive mode" button, then try swiping the bar in and out!
+            Welcome to Basic Gesture Detect!
+            In order to try this sample out, try dragging or tapping this text to see what happens!
             ]]>
         </intro>
-        <sample_action>Toggle immersive mode!</sample_action>
+        <sample_action>Clear Text</sample_action>
     </strings>
 
     <template src="base"/>
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/build.gradle b/input/multitouch/BasicMultitouch/BasicMultitouch/build.gradle
deleted file mode 100644
index 9f4459b..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/build.gradle
+++ /dev/null
@@ -1,6 +0,0 @@
-apply plugin: 'android'
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/images/MultitouchSample.png b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/images/MultitouchSample.png
deleted file mode 100644
index 17447e9..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/images/MultitouchSample.png
+++ /dev/null
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-hdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index c49a01f..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-mdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 34d8c42..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xhdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index abb5f12..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xxhdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index ef649c1..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/strings.xml b/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/strings.xml
deleted file mode 100644
index 541639c..0000000
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  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">BasicMultitouch</string>
-    <string name="explanation">This samples demonstrates the use of <b>MotionEvent</b> properties
- to keep track of individual touches across multiple touch events.\n\n
-Touch the screen with multiple fingers to show that the pointer id
-(also represented by a colour) does not change as new touch events are received.</string>
-
-</resources>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouchSample/.gitignore b/input/multitouch/BasicMultitouch/BasicMultitouchSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/BasicMultitouchSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/input/multitouch/BasicMultitouch/BasicMultitouchSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to input/multitouch/BasicMultitouch/BasicMultitouchSample/proguard-project.txt
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/AndroidManifest.xml b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/AndroidManifest.xml
similarity index 89%
rename from input/multitouch/BasicMultitouch/BasicMultitouch/src/main/AndroidManifest.xml
rename to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/AndroidManifest.xml
index d6709ef..043345c 100644
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/AndroidManifest.xml
+++ b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/AndroidManifest.xml
@@ -16,7 +16,7 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.android.example.input.multitouch.basicMultitouch"
+    package="com.example.android.basicmultitouch"
     android:versionCode="1"
     android:versionName="1.0" >
 
@@ -30,7 +30,7 @@
         android:label="@string/app_name"
         android:theme="@style/AppTheme" >
         <activity
-            android:name="com.example.android.input.multitouch.basicMultitouch.MainActivity"
+            android:name=".MainActivity"
             android:label="@string/app_name" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/MainActivity.java b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/MainActivity.java
similarity index 86%
rename from input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/MainActivity.java
rename to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/MainActivity.java
index 627ada5..fc95a60 100644
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/MainActivity.java
+++ b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/MainActivity.java
@@ -14,24 +14,21 @@
  * limitations under the License.
  */
 
-package com.example.android.input.multitouch.basicMultitouch;
+package com.example.android.basicmultitouch;
 
 import android.app.Activity;
 import android.os.Bundle;
-import android.view.MotionEvent;
-
-import com.android.example.input.multitouch.basicMultitouch.R;
 
 /**
  * This is an example of keeping track of individual touches across multiple
- * {@link MotionEvent}s.
+ * {@link android.view.MotionEvent}s.
  * <p>
  * This is illustrated by a View ({@link TouchDisplayView}) that responds to
  * touch events and draws coloured circles for each pointer, stores the last
  * positions of this pointer and draws them. This example shows the relationship
  * between MotionEvent indices, pointer identifiers and actions.
  *
- * @see MotionEvent
+ * @see android.view.MotionEvent
  */
 public class MainActivity extends Activity {
     TouchDisplayView mView;
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/common/Pools.java b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/Pools.java
similarity index 98%
rename from input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/common/Pools.java
rename to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/Pools.java
index 67c937b..0eda0ee 100644
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/common/Pools.java
+++ b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/Pools.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.common;
+package com.example.android.basicmultitouch;
 
 /**
  * Helper class for crating pools of objects. An example use looks like this:
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/TouchDisplayView.java b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/TouchDisplayView.java
similarity index 95%
rename from input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/TouchDisplayView.java
rename to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/TouchDisplayView.java
index 55bcf8f..78e6abe 100644
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/java/com/example/android/input/multitouch/basicMultitouch/TouchDisplayView.java
+++ b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/java/com/example/android/basicmultitouch/TouchDisplayView.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.input.multitouch.basicMultitouch;
+package com.example.android.basicmultitouch;
 
 import android.content.Context;
 import android.graphics.Canvas;
@@ -26,11 +26,11 @@
 import android.view.MotionEvent;
 import android.view.View;
 
-import com.example.android.common.Pools.SimplePool;
+import com.example.android.basicmultitouch.Pools.SimplePool;
 
 /**
  * View that shows touch events and their history. This view demonstrates the
- * use of {@link #onTouchEvent(MotionEvent)} and {@link MotionEvent}s to keep
+ * use of {@link #onTouchEvent(android.view.MotionEvent)} and {@link android.view.MotionEvent}s to keep
  * track of touch pointers across events.
  */
 public class TouchDisplayView extends View {
@@ -123,7 +123,7 @@
         super(context, attrs);
 
         // SparseArray for touch events, indexed by touch id
-        mTouches = new SparseArray<TouchDisplayView.TouchHistory>(10);
+        mTouches = new SparseArray<TouchHistory>(10);
 
         initialisePaint();
     }
@@ -337,7 +337,7 @@
     };
 
     /**
-     * Sets up the required {@link Paint} objects for the screen density of this
+     * Sets up the required {@link android.graphics.Paint} objects for the screen density of this
      * device.
      */
     private void initialisePaint() {
@@ -360,9 +360,9 @@
     }
 
     /**
-     * Draws the data encapsulated by a {@link TouchHistory} object to a canvas.
+     * Draws the data encapsulated by a {@link TouchDisplayView.TouchHistory} object to a canvas.
      * A large circle indicates the current position held by the
-     * {@link TouchHistory} object, while a smaller circle is drawn for each
+     * {@link TouchDisplayView.TouchHistory} object, while a smaller circle is drawn for each
      * entry in its history. The size of the large circle is scaled depending on
      * its pressure, clamped to a maximum of <code>1.0</code>.
      *
@@ -370,7 +370,7 @@
      * @param id
      * @param data
      */
-    protected void drawCircle(Canvas canvas, int id, TouchDisplayView.TouchHistory data) {
+    protected void drawCircle(Canvas canvas, int id, TouchHistory data) {
         // select the color based on the id
         int color = COLORS[id % COLORS.length];
         mCirclePaint.setColor(color);
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/layout/layout_mainactivity.xml b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/layout/layout_mainactivity.xml
similarity index 79%
rename from input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/layout/layout_mainactivity.xml
rename to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/layout/layout_mainactivity.xml
index a53e5f1..539a43a 100644
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/layout/layout_mainactivity.xml
+++ b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/layout/layout_mainactivity.xml
@@ -8,9 +8,9 @@
         android:layout_height="wrap_content"
         android:layout_gravity="center"
         android:padding="75dp"
-        android:text="@string/explanation" />
+        android:text="@string/intro_message" />
 
-    <com.example.android.input.multitouch.basicMultitouch.TouchDisplayView
+    <com.example.android.basicmultitouch.TouchDisplayView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content" />
 
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values-v11/styles.xml b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values-v11/styles.xml
similarity index 100%
rename from input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values-v11/styles.xml
rename to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values-v11/styles.xml
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values-v14/styles.xml b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values-v14/styles.xml
similarity index 100%
rename from input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values-v14/styles.xml
rename to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values-v14/styles.xml
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/strings.xml
similarity index 89%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml
rename to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/strings.xml
index 0e00174..5765548 100644
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml
+++ b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/strings.xml
@@ -1,3 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
 <!--
   Copyright 2013 The Android Open Source Project
 
@@ -12,10 +13,8 @@
   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>
 
-    <dimen name="page_margin">@dimen/margin_huge</dimen>
-
-</resources>
+</resources>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/styles.xml b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/styles.xml
similarity index 84%
rename from input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/styles.xml
rename to input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/styles.xml
index dedc633..e56d4f8 100644
--- a/input/multitouch/BasicMultitouch/BasicMultitouch/src/main/res/values/styles.xml
+++ b/input/multitouch/BasicMultitouch/BasicMultitouchSample/src/main/res/values/styles.xml
@@ -27,9 +27,4 @@
         -->
     </style>
 
-    <!-- Application theme. -->
-    <style name="AppTheme" parent="AppBaseTheme">
-        <!-- All customizations that are NOT specific to a particular API-level can go here. -->
-    </style>
-
 </resources>
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/README.txt b/input/multitouch/BasicMultitouch/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/input/multitouch/BasicMultitouch/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/input/multitouch/BasicMultitouch/_index.jd b/input/multitouch/BasicMultitouch/_index.jd
new file mode 100644
index 0000000..2d7bdc5
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/_index.jd
@@ -0,0 +1,14 @@
+
+
+
+page.tags="BasicMultitouch"
+sample.group=NoGroup
+@jd:body
+
+<p>
+    This samples demonstrates the use of MotionEvent properties to keep track of individual touches
+    across multiple touch events.
+</p><p>
+    Touch the screen with multiple fingers to show that the pointer id
+    (also represented by a colour) does not change as new touch events are received.</string>
+</p>
diff --git a/input/multitouch/BasicMultitouch/build.gradle b/input/multitouch/BasicMultitouch/build.gradle
index 036abc8..ffb5c2f 100644
--- a/input/multitouch/BasicMultitouch/build.gradle
+++ b/input/multitouch/BasicMultitouch/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/input/multitouch/BasicMultitouch/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to input/multitouch/BasicMultitouch/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/input/multitouch/BasicMultitouch/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/input/multitouch/BasicMultitouch/gradle/wrapper/gradle-wrapper.properties b/input/multitouch/BasicMultitouch/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/input/multitouch/BasicMultitouch/gradle/wrapper/gradle-wrapper.properties
+++ b/input/multitouch/BasicMultitouch/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/input/multitouch/BasicMultitouch/multitouch.jd b/input/multitouch/BasicMultitouch/multitouch.jd
deleted file mode 100644
index d9108bb..0000000
--- a/input/multitouch/BasicMultitouch/multitouch.jd
+++ /dev/null
@@ -1,24 +0,0 @@
-page.title=Multitouch Sample
-@jd:body
-
-<p>This samples demonstrates the use of <pre>MotionEvent</pre> properties to keep track of individual touches across multiple touch events.</p>
-
-<p>A <a href="http://developer.android.com/reference/android/view/MotionEvent.html">MotionEvent</a> describes a movement event.
-For touch events, they contain an action, X and Y coordinates and other relevant information. Multi-touch screens can report multiple movement traces at the same time, 
-reporting all active touches within a single <pre>MotionEvent</pre>.</p>
-
-<p>Each pointer has a unique id that is assigned when it first goes down
- (indicated by <pre><a href="/reference/android/view/MotionEvent.html#ACTION_DOWN">ACTION_DOWN</a></pre> or <pre><a href="/reference/android/view/MotionEvent.html#ACTION_POINTER_DOWN">ACTION_POINTER_DOWN</a></pre>).  A pointer id
- remains valid until the pointer eventually goes up (indicated by <pre><a href="/reference/android/view/MotionEvent.html#ACTION_UP">ACTION_UP</a></pre>
- or <pre><a href="/reference/android/view/MotionEvent.html#ACTION_POINTER_UP">ACTION_POINTER_UP</a></pre>) or when the gesture is canceled (indicated by
- <pre><a href="/reference/android/view/MotionEvent.html#ACTION_CANCEL">ACTION_CANCEL</a></pre>).
- </p>
- 
-<p>The sample shows how these pointer identifiers can be used over subsequent events to track individual fingers. 
-This is illustrated by a custom View that responds to touch events. Coloured circles are drawn for each finger, showing its current and past position on the screen.
-This example shows the relationship between <pre>MotionEvent</pre> indices, pointer identifiers and <pre>MotionEvent</pre> actions.</p>
-
-<p>For more information, see the relevant <a href="http://android-developers.blogspot.com.au/2010/06/making-sense-of-multitouch.html">blog post</a> and 
-<a href="http://developer.android.com/reference/android/view/MotionEvent.html"><pre>MotionEvent</pre></a> API documentation. </p> 
-
-<p><img src="images/MultitouchSample.png" /></p>
diff --git a/input/multitouch/BasicMultitouch/settings.gradle b/input/multitouch/BasicMultitouch/settings.gradle
index 5587917..6e6c5ba 100644
--- a/input/multitouch/BasicMultitouch/settings.gradle
+++ b/input/multitouch/BasicMultitouch/settings.gradle
@@ -1 +1,4 @@
-include ':BasicMultitouch'
+
+
+
+include 'BasicMultitouchSample'
diff --git a/input/multitouch/BasicMultitouch/template-params.xml b/input/multitouch/BasicMultitouch/template-params.xml
new file mode 100644
index 0000000..7bd997f
--- /dev/null
+++ b/input/multitouch/BasicMultitouch/template-params.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>BasicMultitouch</name>
+    <group>NoGroup</group>
+    <package>com.example.android.basicmultitouch</package>
+
+
+
+    <!-- change minSdk if needed-->
+    <minSdk>8</minSdk>
+
+
+    <strings>
+        <intro>
+            <![CDATA[
+This samples demonstrates the use of MotionEvent properties to keep track of individual touches
+across multiple touch events.
+\n\nTouch the screen with multiple fingers to show that the pointer id
+(also represented by a colour) does not change as new touch events are received.</string>
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/build.gradle b/media/BasicMediaDecoder/BasicMediaDecoder/build.gradle
deleted file mode 100644
index b89e935..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoder/build.gradle
+++ /dev/null
@@ -1,23 +0,0 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
-}
-apply plugin: 'android'
-
-dependencies {
-    compile files('libs/android-support-v4.jar')
-}
-
-android {
-    compileSdkVersion 17
-    buildToolsVersion "18.0.1"
-
-    defaultConfig {
-        minSdkVersion 16
-        targetSdkVersion 16
-    }
-}
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/AndroidManifest.xml b/media/BasicMediaDecoder/BasicMediaDecoder/src/main/AndroidManifest.xml
deleted file mode 100644
index 889f1f2..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.media.basicmediadecoder"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="17"/>
-    <application
-        android:label="@string/app_name" android:icon="@drawable/ic_launcher">
-        <activity
-            android:name=".MainActivity"
-            android:screenOrientation="landscape"
-            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/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/layout/activity_main.xml b/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/layout/activity_main.xml
deleted file mode 100644
index 2926e81..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
-              android:orientation="vertical"
-              android:layout_width="fill_parent"
-              android:layout_height="fill_parent"
-    >
-    <TextureView
-        android:id="@+id/PlaybackView"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent"/>
-    <TextView
-            android:id="@+id/AttribView"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="right|bottom"
-            android:visibility="gone"
-            android:textColor="@android:color/holo_blue_bright"
-            android:text="@string/app_video_attrib"/>
-</FrameLayout>
-
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/menu/action_menu.xml b/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/menu/action_menu.xml
deleted file mode 100644
index b2a2a4d..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/menu/action_menu.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:id="@+id/menu_play"
-          android:icon="@drawable/selector_play"
-          android:title="Play"
-          android:showAsAction="ifRoom|withText" />
-</menu>
\ No newline at end of file
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/raw b/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/raw
deleted file mode 120000
index 0905975..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/raw
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../common/assets/video/
\ No newline at end of file
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/values/strings.xml b/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/values/strings.xml
deleted file mode 100644
index 68e5c22..0000000
--- a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-    <string name="app_name">BasicMediaDecoder</string>
-    <string name="app_video_attrib">(c) copyright 2008, Blender Foundation / www.bigbuckbunny.org
-    </string>
-</resources>
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/.gitignore b/media/BasicMediaDecoder/BasicMediaDecoderSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/media/BasicMediaDecoder/BasicMediaDecoderSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/media/BasicMediaDecoder/BasicMediaDecoderSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to media/BasicMediaDecoder/BasicMediaDecoderSample/proguard-project.txt
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/AndroidManifest.xml b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..d191491
--- /dev/null
+++ b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/AndroidManifest.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.basicmediadecoder"
+    android:versionCode="1"
+    android:versionName="1.0">
+
+    <uses-sdk android:minSdkVersion="17"/>
+    <application
+        android:label="@string/app_name" android:icon="@drawable/ic_launcher">
+        <activity
+            android:name=".MainActivity"
+            android:screenOrientation="landscape"
+            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/media/BasicMediaDecoder/BasicMediaDecoder/src/main/java/com/example/android/media/basicmediadecoder/MainActivity.java b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/java/com/example/android/basicmediadecoder/MainActivity.java
similarity index 93%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/java/com/example/android/media/basicmediadecoder/MainActivity.java
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/java/com/example/android/basicmediadecoder/MainActivity.java
index 96e7d60..cac5bf2 100644
--- a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/java/com/example/android/media/basicmediadecoder/MainActivity.java
+++ b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/java/com/example/android/basicmediadecoder/MainActivity.java
@@ -14,25 +14,30 @@
  * limitations under the License.
  */
 
-package com.example.android.media.basicmediadecoder;
+package com.example.android.basicmediadecoder;
 
 
-import com.example.android.common.media.MediaCodecWrapper;
-
 import android.animation.TimeAnimator;
 import android.app.Activity;
 import android.media.MediaCodec;
 import android.media.MediaExtractor;
 import android.net.Uri;
 import android.os.Bundle;
-import android.view.*;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.Surface;
+import android.view.TextureView;
+import android.view.View;
 import android.widget.TextView;
 
+import com.example.android.common.media.MediaCodecWrapper;
+
 import java.io.IOException;
 
 /**
- * This activity uses a {@link TextureView} to render the frames of a video decoded using
- * {@link MediaCodec} API.
+ * This activity uses a {@link android.view.TextureView} to render the frames of a video decoded using
+ * {@link android.media.MediaCodec} API.
  */
 public class MainActivity extends Activity {
 
@@ -52,7 +57,7 @@
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
         mPlaybackView = (TextureView) findViewById(R.id.PlaybackView);
         mAttribView =  (TextView)findViewById(R.id.AttribView);
 
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-hdpi/ic_action_play.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_action_play.png
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-hdpi/ic_action_play.png
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_action_play.png
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-hdpi/ic_action_play_disabled.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_action_play_disabled.png
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-hdpi/ic_action_play_disabled.png
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_action_play_disabled.png
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-hdpi/ic_launcher.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-hdpi/ic_launcher.png
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-mdpi/ic_action_play.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_action_play.png
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-mdpi/ic_action_play.png
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_action_play.png
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-mdpi/ic_action_play_disabled.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_action_play_disabled.png
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-mdpi/ic_action_play_disabled.png
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_action_play_disabled.png
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-mdpi/ic_launcher.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-mdpi/ic_launcher.png
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-xhdpi/ic_action_play.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_action_play.png
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-xhdpi/ic_action_play.png
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_action_play.png
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-xhdpi/ic_action_play_disabled.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_action_play_disabled.png
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-xhdpi/ic_action_play_disabled.png
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_action_play_disabled.png
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-xhdpi/ic_launcher.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-xhdpi/ic_launcher.png
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-xxhdpi/ic_launcher.png b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable/selector_play.xml b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable/selector_play.xml
similarity index 100%
rename from media/BasicMediaDecoder/BasicMediaDecoder/src/main/res/drawable/selector_play.xml
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/drawable/selector_play.xml
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/layout/sample_main.xml b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/layout/sample_main.xml
new file mode 100644
index 0000000..7543120
--- /dev/null
+++ b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/layout/sample_main.xml
@@ -0,0 +1,35 @@
+<?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.
+-->
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+              android:orientation="vertical"
+              android:layout_width="fill_parent"
+              android:layout_height="fill_parent"
+    >
+    <TextureView
+        android:id="@+id/PlaybackView"
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"/>
+    <TextView
+            android:id="@+id/AttribView"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="right|bottom"
+            android:visibility="gone"
+            android:textColor="@android:color/holo_blue_bright"
+            android:text="@string/app_video_attrib"/>
+</FrameLayout>
+
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/menu/action_menu.xml b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/menu/action_menu.xml
new file mode 100644
index 0000000..2b31a86
--- /dev/null
+++ b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/menu/action_menu.xml
@@ -0,0 +1,22 @@
+<?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.
+-->
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/menu_play"
+          android:icon="@drawable/selector_play"
+          android:title="Play"
+          android:showAsAction="ifRoom|withText" />
+</menu>
\ No newline at end of file
diff --git a/common/assets/video/vid_bigbuckbunny.mp4 b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/raw/vid_bigbuckbunny.mp4
similarity index 100%
rename from common/assets/video/vid_bigbuckbunny.mp4
rename to media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/raw/vid_bigbuckbunny.mp4
Binary files differ
diff --git a/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/values/strings.xml b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/values/strings.xml
new file mode 100644
index 0000000..2cf79ab
--- /dev/null
+++ b/media/BasicMediaDecoder/BasicMediaDecoderSample/src/main/res/values/strings.xml
@@ -0,0 +1,20 @@
+<?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_video_attrib">(c) copyright 2008, Blender Foundation / www.bigbuckbunny.org
+    </string>
+</resources>
diff --git a/media/BasicMediaDecoder/build.gradle b/media/BasicMediaDecoder/build.gradle
index 495c503..c886d80 100644
--- a/media/BasicMediaDecoder/build.gradle
+++ b/media/BasicMediaDecoder/build.gradle
@@ -1 +1,11 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../build"
+  pathToSamplesCommon "../../common"
+}
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/media/BasicMediaDecoder/buildSrc/build.gradle
similarity index 98%
rename from ui/ImmersiveMode/buildSrc/build.gradle
rename to media/BasicMediaDecoder/buildSrc/build.gradle
index 8c294c2..29282af 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/media/BasicMediaDecoder/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
diff --git a/media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.properties b/media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.properties
index 5c22dec..861eddc 100644
--- a/media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.properties
+++ b/media/BasicMediaDecoder/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/media/BasicMediaDecoder/settings.gradle b/media/BasicMediaDecoder/settings.gradle
index 217721c..1e76e09 100644
--- a/media/BasicMediaDecoder/settings.gradle
+++ b/media/BasicMediaDecoder/settings.gradle
@@ -1 +1,4 @@
-include ':BasicMediaDecoder'
+
+
+
+include 'BasicMediaDecoderSample'
diff --git a/media/BasicMediaDecoder/template-params.xml b/media/BasicMediaDecoder/template-params.xml
new file mode 100644
index 0000000..8d412dc
--- /dev/null
+++ b/media/BasicMediaDecoder/template-params.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>BasicMediaDecoder</name>
+    <group>Media</group>
+    <package>com.example.android.basicmediadecoder</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>17</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+             This activity uses a TextureView to render the frames of a video decoded using the
+             MediaCodec API.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="media"/>
+</sample>
diff --git a/media/BasicMediaRouter/BasicMediaRouter/build.gradle b/media/BasicMediaRouter/BasicMediaRouter/build.gradle
deleted file mode 100644
index 9f4459b..0000000
--- a/media/BasicMediaRouter/BasicMediaRouter/build.gradle
+++ /dev/null
@@ -1,6 +0,0 @@
-apply plugin: 'android'
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/AndroidManifest.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/AndroidManifest.xml
deleted file mode 100644
index f909d5e..0000000
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.output.mediaroutersample"
-    android:versionCode="1"
-    android:versionName="1.0" >
-
-    <uses-sdk
-        android:minSdkVersion="17"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name="com.example.android.media.basicmediarouter.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>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-hdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 2fd4ce4..0000000
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-mdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 56b78c5..0000000
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xhdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index da3db3b..0000000
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xxhdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index 4aa8bdd..0000000
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v11/styles.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v11/styles.xml
deleted file mode 100644
index 541752f..0000000
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<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">
-        <!-- API 11 theme customizations can go here. -->
-    </style>
-
-</resources>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v14/styles.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v14/styles.xml
deleted file mode 100644
index f20e015..0000000
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values-v14/styles.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-<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>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/strings.xml b/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/strings.xml
deleted file mode 100644
index ca9e53f..0000000
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<resources>
-
-    <string name="menu_present_to">Present to</string>
-    <string name="app_name">BasicMediaRouter Sample</string>
-    <string name="title_activity_main">MainActivity</string>
-    <string name="intro">This sample demonstrates the use of the MediaRouter API to display
- content on a secondary display.\n\nUse the <b>Media Route Action Item</b> in the ActionBar
- to select an output device. If your device supports Miracast wireless displays,
- you may need to enable <b>Wireless Display</b> functionality in the system settings.
- Secondary screen simulation can also be enabled from the <b>Developer Options</b>.\n\n
-Once connected, use the <b>Change Color</b> button to change the background color of the secondary screen.
-</string>
-    <string name="secondary_connected">Connected to:\n%s</string>
-    <string name="secondary_notconnected">No secondary display connected.</string>
-    <string name="change_color">Change Color</string>
-    <string name="display_name">This display is: %s</string>
-    <string name="display_color">Background color: #%X</string>
-
-</resources>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/.gitignore b/media/BasicMediaRouter/BasicMediaRouterSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouterSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/media/BasicMediaRouter/BasicMediaRouterSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to media/BasicMediaRouter/BasicMediaRouterSample/proguard-project.txt
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/AndroidManifest.xml
similarity index 74%
copy from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
copy to media/BasicMediaRouter/BasicMediaRouterSample/src/main/AndroidManifest.xml
index 3c0e66a..33c20d5 100644
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
+++ b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/AndroidManifest.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright (C) 2013 The Android Open Source Project
+ 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
+     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,
@@ -16,13 +16,13 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.ui.accessibility.BasicAccessibility"
+    package="com.example.android.basicmediarouter"
     android:versionCode="1"
     android:versionName="1.0" >
 
     <uses-sdk
-        android:minSdkVersion="11"
-        android:targetSdkVersion="16" />
+        android:minSdkVersion="17"
+        android:targetSdkVersion="17" />
 
     <application
         android:allowBackup="true"
@@ -30,7 +30,7 @@
         android:label="@string/app_name"
         android:theme="@style/AppTheme" >
         <activity
-            android:name="com.example.android.ui.accessibility.BasicAccessibility.MainActivity"
+            android:name=".MainActivity"
             android:label="@string/app_name" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
@@ -38,5 +38,4 @@
             </intent-filter>
         </activity>
     </application>
-
 </manifest>
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/MainActivity.java b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/MainActivity.java
similarity index 83%
rename from media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/MainActivity.java
rename to media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/MainActivity.java
index ccf6ad0..23b2709 100644
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/MainActivity.java
+++ b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/MainActivity.java
@@ -14,11 +14,10 @@
  * limitations under the License.
  */
 
-package com.example.android.media.basicmediarouter;
+package com.example.android.basicmediarouter;
 
 import android.app.Activity;
 import android.app.MediaRouteActionProvider;
-import android.app.Presentation;
 import android.content.Context;
 import android.content.DialogInterface;
 import android.media.MediaRouter;
@@ -32,18 +31,16 @@
 import android.widget.Button;
 import android.widget.TextView;
 
-import com.example.android.output.mediaroutersample.R;
-
 /**
  * <p>
  * This sample demonstrates the use of the MediaRouter API to show content on a
- * secondary display using a {@link Presentation}.
+ * secondary display using a {@link android.app.Presentation}.
  * </p>
  * <p>
- * The activity uses the {@link MediaRouter} API to automatically detect when a
+ * The activity uses the {@link android.media.MediaRouter} API to automatically detect when a
  * presentation display is available and to allow the user to control the media
- * routes using a menu item provided by the {@link MediaRouteActionProvider}.
- * When a presentation display is available a {@link Presentation} (implemented
+ * routes using a menu item provided by the {@link android.app.MediaRouteActionProvider}.
+ * When a presentation display is available a {@link android.app.Presentation} (implemented
  * as a {@link SamplePresentation}) is shown on the preferred display. A button
  * toggles the background color of the secondary screen to show the interaction
  * between the primary and secondary screens.
@@ -54,8 +51,8 @@
  * to simulate secondary displays.
  * </p>
  *
- * @see Presentation
- * @see MediaRouter
+ * @see android.app.Presentation
+ * @see android.media.MediaRouter
  */
 public class MainActivity extends Activity {
 
@@ -68,7 +65,7 @@
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
         mTextStatus = (TextView) findViewById(R.id.textStatus);
 
         // get the list of background colors
@@ -91,19 +88,19 @@
     }
 
     /**
-     * Implementing a {@link MediaRouter.Callback} to update the displayed
-     * {@link Presentation} when a route is selected, unselected or the
+     * Implementing a {@link android.media.MediaRouter.Callback} to update the displayed
+     * {@link android.app.Presentation} when a route is selected, unselected or the
      * presentation display has changed. The provided stub implementation
-     * {@link MediaRouter.SimpleCallback} is extended and only
-     * {@link MediaRouter.SimpleCallback#onRouteSelected(MediaRouter, int, RouteInfo)}
+     * {@link android.media.MediaRouter.SimpleCallback} is extended and only
+     * {@link android.media.MediaRouter.SimpleCallback#onRouteSelected(android.media.MediaRouter, int, android.media.MediaRouter.RouteInfo)}
      * ,
-     * {@link MediaRouter.SimpleCallback#onRouteUnselected(MediaRouter, int, RouteInfo)}
+     * {@link android.media.MediaRouter.SimpleCallback#onRouteUnselected(android.media.MediaRouter, int, android.media.MediaRouter.RouteInfo)}
      * and
-     * {@link MediaRouter.SimpleCallback#onRoutePresentationDisplayChanged(MediaRouter, RouteInfo)}
-     * are overridden to update the displayed {@link Presentation} in
+     * {@link android.media.MediaRouter.SimpleCallback#onRoutePresentationDisplayChanged(android.media.MediaRouter, android.media.MediaRouter.RouteInfo)}
+     * are overridden to update the displayed {@link android.app.Presentation} in
      * {@link #updatePresentation()}. These callbacks enable or disable the
      * second screen presentation based on the routing provided by the
-     * {@link MediaRouter} for {@link MediaRouter#ROUTE_TYPE_LIVE_VIDEO}
+     * {@link android.media.MediaRouter} for {@link android.media.MediaRouter#ROUTE_TYPE_LIVE_VIDEO}
      * streams. @
      */
     private final MediaRouter.SimpleCallback mMediaRouterCallback =
@@ -142,9 +139,9 @@
 
     /**
      * Updates the displayed presentation to enable a secondary screen if it has
-     * been selected in the {@link MediaRouter} for the
-     * {@link MediaRouter#ROUTE_TYPE_LIVE_VIDEO} type. If no screen has been
-     * selected by the {@link MediaRouter}, the current screen is disabled.
+     * been selected in the {@link android.media.MediaRouter} for the
+     * {@link android.media.MediaRouter#ROUTE_TYPE_LIVE_VIDEO} type. If no screen has been
+     * selected by the {@link android.media.MediaRouter}, the current screen is disabled.
      * Otherwise a new {@link SamplePresentation} is initialized and shown on
      * the secondary screen.
      */
@@ -152,7 +149,7 @@
 
         // BEGIN_INCLUDE(updatePresentationInit)
         // Get the selected route for live video
-        MediaRouter.RouteInfo selectedRoute = mMediaRouter.getSelectedRoute(
+        RouteInfo selectedRoute = mMediaRouter.getSelectedRoute(
                 MediaRouter.ROUTE_TYPE_LIVE_VIDEO);
 
         // Get its Display if a valid route has been selected
@@ -245,8 +242,8 @@
 
     /**
      * Inflates the ActionBar or options menu. The menu file defines an item for
-     * the {@link MediaRouteActionProvider}, which is registered here for all
-     * live video devices using {@link MediaRouter#ROUTE_TYPE_LIVE_VIDEO}.
+     * the {@link android.app.MediaRouteActionProvider}, which is registered here for all
+     * live video devices using {@link android.media.MediaRouter#ROUTE_TYPE_LIVE_VIDEO}.
      */
     @Override
     public boolean onCreateOptionsMenu(Menu menu) {
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/SamplePresentation.java b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/SamplePresentation.java
similarity index 89%
rename from media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/SamplePresentation.java
rename to media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/SamplePresentation.java
index 0938635..ac1f40f 100644
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/java/com/example/android/media/basicmediarouter/SamplePresentation.java
+++ b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/java/com/example/android/basicmediarouter/SamplePresentation.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.media.basicmediarouter;
+package com.example.android.basicmediarouter;
 
 import android.app.Presentation;
 import android.content.Context;
@@ -23,16 +23,14 @@
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
-import com.example.android.output.mediaroutersample.R;
-
 /**
  * <p>
- * A {@link Presentation} used to demonstrate interaction between primary and
+ * A {@link android.app.Presentation} used to demonstrate interaction between primary and
  * secondary screens.
  * </p>
  * <p>
  * It displays the name of the display in which it has been embedded (see
- * {@link Presentation#getDisplay()}) and exposes a facility to change its
+ * {@link android.app.Presentation#getDisplay()}) and exposes a facility to change its
  * background color and display its text.
  * </p>
  */
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/layout/display.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/layout/display.xml
similarity index 100%
rename from media/BasicMediaRouter/BasicMediaRouter/src/main/res/layout/display.xml
rename to media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/layout/display.xml
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/layout/activity_main.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/layout/sample_main.xml
similarity index 95%
rename from media/BasicMediaRouter/BasicMediaRouter/src/main/res/layout/activity_main.xml
rename to media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/layout/sample_main.xml
index 18565c4..2768514 100644
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/layout/activity_main.xml
+++ b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/layout/sample_main.xml
@@ -11,7 +11,7 @@
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
         android:padding="5dp"
-        android:text="@string/intro" />
+        android:text="@string/intro_message" />
 
     <TextView
         android:id="@+id/textStatus"
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/menu/main.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/menu/main.xml
similarity index 100%
rename from media/BasicMediaRouter/BasicMediaRouter/src/main/res/menu/main.xml
rename to media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/menu/main.xml
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/colors.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/colors.xml
similarity index 100%
rename from media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/colors.xml
rename to media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/colors.xml
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/strings.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/strings.xml
new file mode 100644
index 0000000..40c023a
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/strings.xml
@@ -0,0 +1,9 @@
+<resources>
+    <string name="menu_present_to">Present to</string>
+    <string name="title_activity_main">MainActivity</string>
+    <string name="secondary_connected">Connected to:\n%s</string>
+    <string name="secondary_notconnected">No secondary display connected.</string>
+    <string name="change_color">Change Color</string>
+    <string name="display_name">This display is: %s</string>
+    <string name="display_color">Background color: #%X</string>
+</resources>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/styles.xml b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/styles.xml
similarity index 79%
rename from media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/styles.xml
rename to media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/styles.xml
index 05c67f3..4f64054 100644
--- a/media/BasicMediaRouter/BasicMediaRouter/src/main/res/values/styles.xml
+++ b/media/BasicMediaRouter/BasicMediaRouterSample/src/main/res/values/styles.xml
@@ -12,10 +12,6 @@
         -->
     </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="DisplayLargeText">
         <item name="android:textSize">30sp</item>
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/tests/AndroidManifest.xml b/media/BasicMediaRouter/BasicMediaRouterSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouterSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/media/BasicMediaRouter/BasicMediaRouterSample/tests/src/com/example/android/basicmediarouter/tests/SampleTests.java b/media/BasicMediaRouter/BasicMediaRouterSample/tests/src/com/example/android/basicmediarouter/tests/SampleTests.java
new file mode 100644
index 0000000..5c475a3
--- /dev/null
+++ b/media/BasicMediaRouter/BasicMediaRouterSample/tests/src/com/example/android/basicmediarouter/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.basicmediarouter.tests;
+
+import com.example.android.basicmediarouter.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for BasicMediaRouter sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private BasicMediaRouterFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (BasicMediaRouterFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/media/BasicMediaRouter/README.txt b/media/BasicMediaRouter/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/media/BasicMediaRouter/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/media/BasicMediaRouter/_index.jd b/media/BasicMediaRouter/_index.jd
new file mode 100644
index 0000000..4bba1a5
--- /dev/null
+++ b/media/BasicMediaRouter/_index.jd
@@ -0,0 +1,17 @@
+
+
+
+page.tags="BasicMediaRouter"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+            This sample demonstrates the use of the MediaRouter API to display
+ content on a secondary display.\n\nUse the "Media Route Action Item" in the ActionBar
+ to select an output device. If your device supports Miracast wireless displays,
+ you may need to enable "Wireless Display" functionality in the system settings.
+ Secondary screen simulation can also be enabled from the "Developer Options".\n\n
+Once connected, use the "Change Color" button to change the background color of the secondary screen.
+            
+        </p>
diff --git a/media/BasicMediaRouter/build.gradle b/media/BasicMediaRouter/build.gradle
index 036abc8..c886d80 100644
--- a/media/BasicMediaRouter/build.gradle
+++ b/media/BasicMediaRouter/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../build"
+  pathToSamplesCommon "../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/media/BasicMediaRouter/buildSrc/build.gradle
similarity index 98%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to media/BasicMediaRouter/buildSrc/build.gradle
index 8c294c2..29282af 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/media/BasicMediaRouter/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
diff --git a/media/BasicMediaRouter/gradle/wrapper/gradle-wrapper.properties b/media/BasicMediaRouter/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/media/BasicMediaRouter/gradle/wrapper/gradle-wrapper.properties
+++ b/media/BasicMediaRouter/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/media/BasicMediaRouter/mediarouter.jd b/media/BasicMediaRouter/mediarouter.jd
deleted file mode 100644
index fcf6ec9..0000000
--- a/media/BasicMediaRouter/mediarouter.jd
+++ /dev/null
@@ -1,26 +0,0 @@
-page.title=MediaRouter Sample
-@jd:body
-<p>
-This sample demonstrates the use of the MediaRouter API to show content on a
-secondary display using a {@link Presentation}.
-</p>
-<p>
-The activity uses the 
-<a href="http://developer.android.com/reference/android/media/MediaRouter.html">MediaRouter</a> API
- to automatically detect when a
- presentation display is available and to allow the user to control the media routes using a menu
- item provided by the 
- <a href="http://developer.android.com/reference/android/app/MediaRouteActionProvider.html">
- MediaRouteActionProvider</a>.
-When a presentation display is available a
- <a href="http://developer.android.com/reference/android/app/Presentation.html">Presentation</a>
- is shown on the preferred display. A button toggles the background color of the secondary screen
- to show the interaction between the primary and secondary screens.
-</p>
-<p>
-This sample requires an HDMI or Wifi display. Alternatively, the
- "Simulate secondary displays" feature in Development Settings can be enabled
- to simulate secondary displays.
-</p>
-
-
diff --git a/media/BasicMediaRouter/settings.gradle b/media/BasicMediaRouter/settings.gradle
index 327efd6..9d5cbc2 100644
--- a/media/BasicMediaRouter/settings.gradle
+++ b/media/BasicMediaRouter/settings.gradle
@@ -1 +1,4 @@
-include ':BasicMediaRouter'
\ No newline at end of file
+
+
+
+include 'BasicMediaRouterSample'
diff --git a/media/BasicMediaRouter/template-params.xml b/media/BasicMediaRouter/template-params.xml
new file mode 100644
index 0000000..4d14028
--- /dev/null
+++ b/media/BasicMediaRouter/template-params.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>BasicMediaRouter</name>
+    <group>NoGroup</group>
+    <package>com.example.android.basicmediarouter</package>
+
+
+
+    <!-- change minSdk if needed-->
+    <minSdk>17</minSdk>
+
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample demonstrates the use of the MediaRouter API to display
+ content on a secondary display.\n\nUse the "Media Route Action Item" in the ActionBar
+ to select an output device. If your device supports Miracast wireless displays,
+ you may need to enable "Wireless Display" functionality in the system settings.
+ Secondary screen simulation can also be enabled from the "Developer Options".\n\n
+Once connected, use the "Change Color" button to change the background color of the secondary screen.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/build.gradle b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/build.gradle
deleted file mode 100644
index 10fb811..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/AndroidManifest.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/AndroidManifest.xml
deleted file mode 100644
index 7693ed1..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
-  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.basicandroidkeystore"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
-
-    <application android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher"
-        android:theme="@style/Theme.Sample">
-
-        <activity android:name=".MainActivity"
-            android:label="@string/app_name"
-            android:uiOptions="splitActionBarWhenNarrow">
-
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-
-    </application>
-
-</manifest>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/LogFragment.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/LogFragment.java
deleted file mode 100644
index 23d4da7..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/LogFragment.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * 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.basicandroidkeystore;
-
-import com.example.android.common.logger.LogView;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.text.Editable;
-import android.text.TextWatcher;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ScrollView;
-
-/**
- * Simple fraggment which contains a LogView and uses is to output log data it receives
- * through the LogNode interface.
- */
-public class LogFragment extends Fragment {
-
-    private LogView mLogView;
-
-    public LogFragment() {}
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-            Bundle savedInstanceState) {
-
-        View result = inflater.inflate(R.layout.log_fragment, container, false);
-
-        mLogView = (LogView) result.findViewById(R.id.sample_output);
-
-        // Wire up so when the text changes, the view scrolls down.
-        final ScrollView scrollView =
-                ((ScrollView) result.findViewById(R.id.log_scroll));
-
-        mLogView.addTextChangedListener(new TextWatcher() {
-            @Override
-            public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
-
-            @Override
-            public void onTextChanged(CharSequence s, int start, int before, int count) {
-                scrollView.fullScroll(ScrollView.FOCUS_DOWN);
-            }
-
-            @Override
-            public void afterTextChanged(Editable s) {
-                scrollView.fullScroll(ScrollView.FOCUS_DOWN);
-            }
-        });
-
-        return result;
-    }
-
-    public LogView getLogView() {
-        return mLogView;
-    }
-}
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/MainActivity.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/MainActivity.java
deleted file mode 100644
index 33af4e5..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/MainActivity.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * 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.basicandroidkeystore;
-
-import android.os.Bundle;
-import android.support.v4.app.FragmentActivity;
-import android.view.Menu;
-import android.view.MenuItem;
-
-import com.example.android.common.SimpleTextFragment;
-import com.example.android.common.logger.LogWrapper;
-import com.example.android.common.logger.MessageOnlyLogFilter;
-import com.example.android.common.logger.Log;
-
-import java.io.IOException;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.InvalidKeyException;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
-import java.security.SignatureException;
-import java.security.UnrecoverableEntryException;
-import java.security.cert.CertificateException;
-
-public class MainActivity extends FragmentActivity {
-
-    public final static String TAG = "MainActivity";
-    public LogFragment mLogFragment;
-
-    public KeyStoreHelper mKeyStoreHelper;
-
-
-    // BEGIN_INCLUDE(values)
-    // You can store multiple key pairs in the Key Store.  The string used to refer to the Key you
-    // want to store, or later pull, is referred to as an "alias" in this case, because calling it
-    // a key, when you use it to retrieve a key, would just be irritating.
-    public static final String ALIAS = "myKey";
-
-    // Some sample data to sign, and later verify using the generated signature.
-    public static final String SAMPLE_INPUT="Hello, Android!";
-
-    // Just a handy place to store the signature in between signing and verifying.
-    public String mSignatureStr = null;
-    // END_INCLUDE(values)
-
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
-
-        SimpleTextFragment actionFragment =
-                (SimpleTextFragment) getSupportFragmentManager()
-                        .findFragmentById(R.id.intro_fragment);
-        actionFragment.setText(R.string.intro_message);
-
-        mKeyStoreHelper = new KeyStoreHelper();
-        mKeyStoreHelper.setAlias(ALIAS);
-        initializeLogging();
-    }
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        getMenuInflater().inflate(R.menu.main, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        switch (item.getItemId()) {
-            case R.id.btn_create_keys:
-                try {
-                    mKeyStoreHelper.createKeys(this);
-                    Log.d(TAG, "Keys created");
-                    return true;
-                } catch (NoSuchAlgorithmException e) {
-                    Log.w(TAG, "RSA not supported", e);
-                } catch (InvalidAlgorithmParameterException e) {
-                    Log.w(TAG, "No such provider: AndroidKeyStore");
-                } catch (NoSuchProviderException e) {
-                    Log.w(TAG, "Invalid Algorithm Parameter Exception", e);
-                }
-                return true;
-            case R.id.btn_sign_data:
-                try {
-                    mSignatureStr = mKeyStoreHelper.signData(SAMPLE_INPUT);
-                } catch (KeyStoreException e) {
-                    Log.w(TAG, "KeyStore not Initialized", e);
-                } catch (UnrecoverableEntryException e) {
-                    Log.w(TAG, "KeyPair not recovered", e);
-                } catch (NoSuchAlgorithmException e) {
-                    Log.w(TAG, "RSA not supported", e);
-                } catch (InvalidKeyException e) {
-                    Log.w(TAG, "Invalid Key", e);
-                } catch (SignatureException e) {
-                    Log.w(TAG, "Invalid Signature", e);
-                } catch (IOException e) {
-                    Log.w(TAG, "IO Exception", e);
-                } catch (CertificateException e) {
-                    Log.w(TAG, "Error occurred while loading certificates", e);
-                }
-                Log.d(TAG, "Signature: " + mSignatureStr);
-                return true;
-
-            case R.id.btn_verify_data:
-                boolean verified = false;
-                try {
-                    if (mSignatureStr != null) {
-                        verified = mKeyStoreHelper.verifyData(SAMPLE_INPUT, mSignatureStr);
-                    }
-                } catch (KeyStoreException e) {
-                    Log.w(TAG, "KeyStore not Initialized", e);
-                } catch (CertificateException e) {
-                    Log.w(TAG, "Error occurred while loading certificates", e);
-                } catch (NoSuchAlgorithmException e) {
-                    Log.w(TAG, "RSA not supported", e);
-                } catch (IOException e) {
-                    Log.w(TAG, "IO Exception", e);
-                } catch (UnrecoverableEntryException e) {
-                    Log.w(TAG, "KeyPair not recovered", e);
-                } catch (InvalidKeyException e) {
-                    Log.w(TAG, "Invalid Key", e);
-                } catch (SignatureException e) {
-                    Log.w(TAG, "Invalid Signature", e);
-                }
-                if (verified) {
-                    Log.d(TAG, "Data Signature Verified");
-                } else {
-                    Log.d(TAG, "Data not verified.");
-                }
-                return true;
-        }
-        return false;
-    }
-
-    /** Create a chain of targets that will receive log data */
-    public void initializeLogging() {
-        // Using Log, front-end to the logging chain, emulates android.util.log method signatures.
-        // Wraps Android's native log framework
-        LogWrapper logWrapper = new LogWrapper();
-        Log.setLogNode(logWrapper);
-
-        // A filter that strips out everything except the message text
-        MessageOnlyLogFilter msgFilter = new MessageOnlyLogFilter();
-        logWrapper.setNext(msgFilter);
-
-        // On screen logging via a fragment with a TextView
-        mLogFragment = (LogFragment) getSupportFragmentManager().findFragmentById(R.id.log_fragment);
-        msgFilter.setNext(mLogFragment.getLogView());
-        Log.i(TAG, "Ready");
-    }
-}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SimpleTextFragment.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SimpleTextFragment.java
deleted file mode 100644
index 2895ea0..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SimpleTextFragment.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * 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.common;
-
-import android.os.Bundle;
-import android.support.v4.app.Fragment;
-import android.util.Log;
-import android.view.Gravity;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.TextView;
-
-/**
- * Simple fragment containing only a TextView.  Used by TextPagerAdapter to create
- * tutorial-style pages for apps.
- */
-public class SimpleTextFragment extends Fragment {
-
-    // Contains the text that will be displayed by this Fragment 	
-    String mText;
-
-    // Contains a resource ID for the text that will be displayed by this fragment. 	
-    int mTextId = -1;
-
-    // Keys which will be used to store/retrieve text passed in via setArguments. 	
-    public static final String TEXT_KEY = "text";
-    public static final String TEXT_ID_KEY = "text_id";
-
-    // For situations where the app wants to modify text at Runtime, exposing the TextView. 	
-    private TextView mTextView;
-
-    public SimpleTextFragment() {
-    }
-
-    @Override
-    public View onCreateView(LayoutInflater inflater, ViewGroup container,
-                             Bundle savedInstanceState) {
-        // Before initializing the textView, check if any arguments were provided via setArguments. 	
-        processArguments();
-
-        // Create a new TextView and set its text to whatever was provided. 	
-        mTextView = new TextView(getActivity());
-
-        if (mText != null) {
-            mTextView.setText(mText);
-            Log.i("SimpleTextFragment", mText);
-        }
-        return mTextView;
-    }
-
-    public TextView getTextView() {
-        return mTextView;
-    }
-
-    /**
-     * Changes the text for this TextView, according to the resource ID provided.
-     *
-     * @param stringId A resource ID representing the text content for this Fragment's TextView.
-     */
-    public void setText(int stringId) {
-        getTextView().setText(getActivity().getString(stringId));
-    }
-
-    /**
-     * Processes the arguments passed into this Fragment via setArguments method.
-     * Currently the method only looks for text or a textID, nothing else.
-     */
-    public void processArguments() {
-        // For most objects we'd handle the multiple possibilities for initialization variables 	
-        // as multiple constructors.  For Fragments, however, it's customary to use 	
-        // setArguments / getArguments. 	
-        if (getArguments() != null) {
-            Bundle args = getArguments();
-            if (args.containsKey(TEXT_KEY)) {
-                mText = args.getString(TEXT_KEY);
-                Log.d("Constructor", "Added Text.");
-            } else if (args.containsKey(TEXT_ID_KEY)) {
-                mTextId = args.getInt(TEXT_ID_KEY);
-                mText = getString(mTextId);
-            }
-        }
-    }
-} 
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/Log.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/Log.java
deleted file mode 100644
index 17503c5..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/Log.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
- * 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.common.logger;
-
-/**
- * Helper class for a list (or tree) of LoggerNodes.
- *
- * <p>When this is set as the head of the list,
- * an instance of it can function as a drop-in replacement for {@link android.util.Log}.
- * Most of the methods in this class server only to map a method call in Log to its equivalent
- * in LogNode.</p>
- */
-public class Log {
-    // Grabbing the native values from Android's native logging facilities,
-    // to make for easy migration and interop.
-    public static final int NONE = -1;
-    public static final int VERBOSE = android.util.Log.VERBOSE;
-    public static final int DEBUG = android.util.Log.DEBUG;
-    public static final int INFO = android.util.Log.INFO;
-    public static final int WARN = android.util.Log.WARN;
-    public static final int ERROR = android.util.Log.ERROR;
-    public static final int ASSERT = android.util.Log.ASSERT;
-
-    // Stores the beginning of the LogNode topology.
-    private static LogNode mLogNode;
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public static LogNode getLogNode() {
-        return mLogNode;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to.
-     */
-    public static void setLogNode(LogNode node) {
-        mLogNode = node;
-    }
-
-    /**
-     * Instructs the LogNode to print the log data provided. Other LogNodes can
-     * be chained to the end of the LogNode as desired.
-     *
-     * @param priority Log level of the data being logged. Verbose, Error, etc.
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void println(int priority, String tag, String msg, Throwable tr) {
-        if (mLogNode != null) {
-            mLogNode.println(priority, tag, msg, tr);
-        }
-    }
-
-    /**
-     * Instructs the LogNode to print the log data provided. Other LogNodes can
-     * be chained to the end of the LogNode as desired.
-     *
-     * @param priority Log level of the data being logged. Verbose, Error, etc.
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     */
-    public static void println(int priority, String tag, String msg) {
-        println(priority, tag, msg, null);
-    }
-
-   /**
-     * Prints a message at VERBOSE priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void v(String tag, String msg, Throwable tr) {
-        println(VERBOSE, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at VERBOSE priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void v(String tag, String msg) {
-        v(tag, msg, null);
-    }
-
-
-    /**
-     * Prints a message at DEBUG priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void d(String tag, String msg, Throwable tr) {
-        println(DEBUG, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at DEBUG priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void d(String tag, String msg) {
-        d(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at INFO priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void i(String tag, String msg, Throwable tr) {
-        println(INFO, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at INFO priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void i(String tag, String msg) {
-        i(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void w(String tag, String msg, Throwable tr) {
-        println(WARN, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void w(String tag, String msg) {
-        w(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at WARN priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void w(String tag, Throwable tr) {
-        w(tag, null, tr);
-    }
-
-    /**
-     * Prints a message at ERROR priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void e(String tag, String msg, Throwable tr) {
-        println(ERROR, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at ERROR priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void e(String tag, String msg) {
-        e(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void wtf(String tag, String msg, Throwable tr) {
-        println(ASSERT, tag, msg, tr);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param msg The actual message to be logged.
-     */
-    public static void wtf(String tag, String msg) {
-        wtf(tag, msg, null);
-    }
-
-    /**
-     * Prints a message at ASSERT priority.
-     *
-     * @param tag Tag for for the log data. Can be used to organize log statements.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public static void wtf(String tag, Throwable tr) {
-        wtf(tag, null, tr);
-    }
-}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogNode.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogNode.java
deleted file mode 100644
index bc37cab..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogNode.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2012 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.common.logger;
-
-/**
- * Basic interface for a logging system that can output to one or more targets.
- * Note that in addition to classes that will output these logs in some format,
- * one can also implement this interface over a filter and insert that in the chain,
- * such that no targets further down see certain data, or see manipulated forms of the data.
- * You could, for instance, write a "ToHtmlLoggerNode" that just converted all the log data
- * it received to HTML and sent it along to the next node in the chain, without printing it
- * anywhere.
- */
-public interface LogNode {
-
-    /**
-     * Instructs first LogNode in the list to print the log data provided.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    public void println(int priority, String tag, String msg, Throwable tr);
-
-}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogView.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogView.java
deleted file mode 100644
index dfe7648..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogView.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * 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.common.logger;
-
-import android.content.Context;
-import android.text.method.ScrollingMovementMethod;
-import android.util.*;
-import android.widget.TextView;
-
-/**
- * Created by alexlucas on 6/4/13.
- */
-
-
-public class LogView extends TextView implements LogNode {
-
-    public LogView(Context context) {
-        super(context);
-    }
-
-    public LogView(Context context, AttributeSet attrs) {
-        super(context, attrs);
-    }
-
-    public LogView(Context context, AttributeSet attrs, int defStyle) {
-        super(context, attrs, defStyle);
-    }
-
-    /**
-     * Formats the log data and prints it out to the LogView.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        String priorityStr = null;
-
-        // For the purposes of this View, we want to print the priority as readable text.
-        switch(priority) {
-            case android.util.Log.VERBOSE:
-                priorityStr = "VERBOSE";
-                break;
-            case android.util.Log.DEBUG:
-                priorityStr = "DEBUG";
-                break;
-            case android.util.Log.INFO:
-                priorityStr = "INFO";
-                break;
-            case android.util.Log.WARN:
-                priorityStr = "WARN";
-                break;
-            case android.util.Log.ERROR:
-                priorityStr = "ERROR";
-                break;
-            case android.util.Log.ASSERT:
-                priorityStr = "ASSERT";
-                break;
-            default:
-                break;
-        }
-
-        // Handily, the Log class has a facility for converting a stack trace into a useable string.
-        String exceptionStr = null;
-        if (tr != null) {
-            exceptionStr = android.util.Log.getStackTraceString(tr);
-        }
-
-        // Take the priority, tag, message, and exception, and concatenate as necessary
-        // into one usable line of text.
-        StringBuilder outputBuilder = new StringBuilder();
-
-        String delimiter = "\t";
-
-        appendIfNotNull(outputBuilder, priorityStr, delimiter);
-        appendIfNotNull(outputBuilder, tag, delimiter);
-        appendIfNotNull(outputBuilder, msg, delimiter);
-        appendIfNotNull(outputBuilder, exceptionStr, delimiter);
-
-        // Actually display the text we just generated within the LogView.
-        appendToLog(outputBuilder.toString());
-
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /** Takes a string and adds to it, with a seperator, if the bit to be added isn't null. Since
-     * the logger takes so many arguments that might be null, this method helps cut out some of the
-     * agonizing tedium of writing the same 3 lines over and over.
-     * @param source Stringbuilder containing the text to append to.
-     * @param addStrStr The String to append
-     * @param delimiter The String to seperate the source and appendee strings. A tab or comma,
-     *                  for instance.
-     * @return The fully concatenated String as a StringBuilder
-     */
-    private StringBuilder appendIfNotNull(StringBuilder source, String addStr, String delimiter) {
-        if (addStr != null) {
-            if (addStr.length() == 0) {
-                delimiter = "";
-            }
-
-            return source.append(addStr).append(delimiter);
-        }
-        return source;
-    }
-
-    // The next LogNode in the chain.
-    LogNode mNext;
-
-    /** Outputs the string as a new line of log data in the LogView. */
-    public void appendToLog(String s) {
-        append(s + "\n");
-    }
-
-
-}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogWrapper.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogWrapper.java
deleted file mode 100644
index 16a9e7b..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/LogWrapper.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2012 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.common.logger;
-
-import android.util.Log;
-
-/**
- * Helper class which wraps Android's native Log utility in the Logger interface.  This way
- * normal DDMS output can be one of the many targets receiving and outputting logs simultaneously.
- */
-public class LogWrapper implements LogNode {
-
-    // For piping:  The next node to receive Log data after this one has done its work.
-    private LogNode mNext;
-
-    /**
-     * Returns the next LogNode in the linked list.
-     */
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to..
-     */
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-    /**
-     * Prints data out to the console using Android's native log mechanism.
-     * @param priority Log level of the data being logged.  Verbose, Error, etc.
-     * @param tag Tag for for the log data.  Can be used to organize log statements.
-     * @param msg The actual message to be logged. The actual message to be logged.
-     * @param tr If an exception was thrown, this can be sent along for the logging facilities
-     *           to extract and print useful information.
-     */
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        // There actually are log methods that don't take a msg parameter.  For now,
-        // if that's the case, just convert null to the empty string and move on.
-        String useMsg = msg;
-        if (useMsg == null) {
-            useMsg = "";
-        }
-
-        // If an exeption was provided, convert that exception to a usable string and attach
-        // it to the end of the msg method.
-        if (tr != null) {
-            msg += "\n" + Log.getStackTraceString(tr);
-        }
-
-        // This is functionally identical to Log.x(tag, useMsg);
-        // For instance, if priority were Log.VERBOSE, this would be the same as Log.v(tag, useMsg)
-        Log.println(priority, tag, useMsg);
-
-        // If this isn't the last node in the chain, move things along.
-        if (mNext != null) {
-            mNext.println(priority, tag, msg, tr);
-        }
-    }
-}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
deleted file mode 100644
index 19967dc..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/logger/MessageOnlyLogFilter.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * 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.common.logger;
-
-/**
- * Simple {@link LogNode} filter, removes everything except the message.
- * Useful for situations like on-screen log output where you don't want a lot of metadata displayed,
- * just easy-to-read message updates as they're happening.
- */
-public class MessageOnlyLogFilter implements LogNode {
-
-    LogNode mNext;
-
-    /**
-     * Takes the "next" LogNode as a parameter, to simplify chaining.
-     *
-     * @param next The next LogNode in the pipeline.
-     */
-    public MessageOnlyLogFilter(LogNode next) {
-        mNext = next;
-    }
-
-    public MessageOnlyLogFilter() {
-    }
-
-    @Override
-    public void println(int priority, String tag, String msg, Throwable tr) {
-        if (mNext != null) {
-            getNext().println(Log.NONE, null, msg, null);
-        }
-    }
-
-    /**
-     * Returns the next LogNode in the chain.
-     */
-    public LogNode getNext() {
-        return mNext;
-    }
-
-    /**
-     * Sets the LogNode data will be sent to..
-     */
-    public void setNext(LogNode node) {
-        mNext = node;
-    }
-
-}
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-hdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100755
index 22ce606..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-mdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100755
index f21e17b..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-xhdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100755
index 64b8059..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-xxhdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100755
index 6b4434a..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/activity_main.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/activity_main.xml
deleted file mode 100755
index a86e2b0..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/activity_main.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<!--
-  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:orientation="vertical"
-        android:layout_width="fill_parent"
-        android:layout_height="fill_parent">
-<fragment
-        android:name="com.example.android.common.SimpleTextFragment"
-        android:id="@+id/intro_fragment"
-        android:layout_weight="1"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-<View
-        android:layout_width="fill_parent"
-        android:layout_height="1dp"
-        android:background="@android:color/darker_gray"/>
-<fragment
-        android:name="com.example.android.basicandroidkeystore.LogFragment"
-        android:id="@+id/log_fragment"
-        android:layout_weight="1"
-        android:layout_width="match_parent"
-        android:layout_height="match_parent" />
-        </LinearLayout>
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/log_fragment.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/log_fragment.xml
deleted file mode 100644
index f2d7b75..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/layout/log_fragment.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-       
-        <!--
-          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:id="@+id/log_scroll"	
-        android:layout_width="match_parent"	
-        android:layout_height="match_parent">	
-        
-        <com.example.android.common.logger.LogView
-                android:id="@+id/sample_output"
-                style="@style/Log"
-                android:layout_width="match_parent"
-                android:layout_height="wrap_content"
-                android:clickable="true"
-                android:focusable="true"
-                android:text=""
-                android:gravity="bottom" />
-</ScrollView>
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values-sw600dp/styles.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values-sw600dp/styles.xml
deleted file mode 100644
index ffcbe8a..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values-sw600dp/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-  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.SampleOutput">
-        <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>
-        <item name="android:textAppearance">?android:textAppearanceLarge</item>
-        <item name="android:lineSpacingMultiplier">1.2</item>
-    </style>
-
-</resources>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values-v11/styles.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values-v11/styles.xml
deleted file mode 100644
index c6c648b..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<!--
-  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="Theme.Base" parent="android:Theme.Holo.Light" />
-</resources>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/dimens.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/dimens.xml
deleted file mode 100644
index 952c220..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-  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/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/strings.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/strings.xml
deleted file mode 100755
index e579aee..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<!--
-  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">Androidkeystore</string>
-    <string name="sample_action">Sample action</string>
-
-    <!-- Steps -->
-    <string name="intro_message">
-        Welcome to the <b>Basic Android Key Store</b> sample!\n\n
-        This sample demonstrates how to use the Android Key Store to safely create and store
-        encryption keys that only your application can access.  You can also sign data using those
-        keys.\n\n
-        To create a new KeyPair, click \"Create\".\n\n
-        To sign some data using a KeyPair, click \"Sign\".\n\n
-        To verify the data using the signature provided, click \"Verify\".\n\n
-    </string>
-
-    <!-- Button labels -->
-    <string name="str_create_keys">Create</string>
-    <string name="str_sign_data">Sign</string>
-    <string name="str_verify_data">Verify</string>
-
-</resources>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/styles.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/styles.xml
deleted file mode 100644
index fb75961..0000000
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<!--
-  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.Light" />
-
-    <style name="Theme.Sample" parent="Theme.Base" />
-
-    <!-- Widget styling -->
-
-    <style name="Widget" />
-
-    <style name="Widget.SampleOutput">
-        <item name="android:padding">@dimen/margin_medium</item>
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-    <style name="Log" parent="Widget.SampleOutput">
-        <item name="android:typeface">monospace</item>
-    </style>
-
-</resources>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/.gitignore b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/README-simpleview.txt b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/README-simpleview.txt
new file mode 100644
index 0000000..4ac7cdb
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/README-simpleview.txt
@@ -0,0 +1,29 @@
+<#--
+        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.
+-->
+
+Steps to implement SimpleView template:
+-in template-params.xml.ftl:
+    -add the following line to common imports
+        <common src="activities"/>
+
+-Add a Fragment to handle behavior.  In your MainActivity.java class, it will reference a Fragment
+ called (yourProjectName)Fragment.java.  Create that file in your project, using the "main" source
+ folder instead of "common" or "templates".
+   For instance, if your package name is com.example.foo, create the file
+   src/main/java/com/example/foo/FooFragment.java
+
+-refer to sampleSamples/simpleViewSample for a reference implementation of a
+project built on this template.
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/proguard-project.txt
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/AndroidManifest.xml
similarity index 62%
copy from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/AndroidManifest.xml
index 7e9a861..28d256c 100644
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/AndroidManifest.xml
@@ -1,11 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+     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,
@@ -13,29 +14,28 @@
  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.actionbarcompat.listpopupmenu"
+    package="com.example.android.basicandroidkeystore"
     android:versionCode="1"
     android:versionName="1.0">
 
-    <!-- ActionBarCompat provides an implementation of Popup Menu from API v7 onwards -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
+    <uses-sdk android:minSdkVersion="18" android:targetSdkVersion="19" />
 
-    <application
-        android:icon="@drawable/ic_launcher"
+    <application android:allowBackup="true"
         android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat"
-        android:allowBackup="true">
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/AppTheme">
 
-        <activity android:name=".MainActivity">
-            <!-- Launcher Intent filter -->
+        <activity android:name=".MainActivity"
+                  android:label="@string/app_name"
+                  android:uiOptions="splitActionBarWhenNarrow">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
             </intent-filter>
         </activity>
     </application>
-
-</manifest>
\ No newline at end of file
+</manifest>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/KeyStoreHelper.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/BasicAndroidKeyStoreFragment.java
similarity index 63%
rename from security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/KeyStoreHelper.java
rename to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/BasicAndroidKeyStoreFragment.java
index 7ccf733..12873e8 100644
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/basicandroidkeystore/KeyStoreHelper.java
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/BasicAndroidKeyStoreFragment.java
@@ -1,27 +1,29 @@
 /*
- * 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.
- */
+* 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.basicandroidkeystore;
 
 import android.content.Context;
+import android.os.Bundle;
 import android.security.KeyPairGeneratorSpec;
+import android.support.v4.app.Fragment;
 import android.util.Base64;
+import android.view.MenuItem;
 
 import com.example.android.common.logger.Log;
-import com.example.android.common.SecurityConstants;
 
 import java.io.IOException;
 import java.math.BigInteger;
@@ -42,15 +44,107 @@
 
 import javax.security.auth.x500.X500Principal;
 
-public class KeyStoreHelper {
+public class BasicAndroidKeyStoreFragment extends Fragment {
 
-    public static final String TAG = "KeyStoreHelper";
+    public static final String TAG = "BasicAndroidKeyStoreFragment";
+
+    // BEGIN_INCLUDE(values)
+
+    public static final String SAMPLE_ALIAS = "myKey";
+
+    // Some sample data to sign, and later verify using the generated signature.
+    public static final String SAMPLE_INPUT="Hello, Android!";
+
+    // Just a handy place to store the signature in between signing and verifying.
+    public String mSignatureStr = null;
 
     // You can store multiple key pairs in the Key Store.  The string used to refer to the Key you
     // want to store, or later pull, is referred to as an "alias" in this case, because calling it
     // a key, when you use it to retrieve a key, would just be irritating.
     private String mAlias = null;
 
+    // END_INCLUDE(values)
+
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setHasOptionsMenu(true);
+        setAlias(SAMPLE_ALIAS);
+    }
+
+    @Override
+    public void onActivityCreated(Bundle savedInstanceState) {
+        super.onActivityCreated(savedInstanceState);
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        switch (item.getItemId()) {
+            case R.id.btn_create_keys:
+                try {
+                    createKeys(getActivity());
+                    Log.d(TAG, "Keys created");
+                    return true;
+                } catch (NoSuchAlgorithmException e) {
+                    Log.w(TAG, "RSA not supported", e);
+                } catch (InvalidAlgorithmParameterException e) {
+                    Log.w(TAG, "No such provider: AndroidKeyStore");
+                } catch (NoSuchProviderException e) {
+                    Log.w(TAG, "Invalid Algorithm Parameter Exception", e);
+                }
+                return true;
+            case R.id.btn_sign_data:
+                try {
+                    mSignatureStr = signData(SAMPLE_INPUT);
+                } catch (KeyStoreException e) {
+                    Log.w(TAG, "KeyStore not Initialized", e);
+                } catch (UnrecoverableEntryException e) {
+                    Log.w(TAG, "KeyPair not recovered", e);
+                } catch (NoSuchAlgorithmException e) {
+                    Log.w(TAG, "RSA not supported", e);
+                } catch (InvalidKeyException e) {
+                    Log.w(TAG, "Invalid Key", e);
+                } catch (SignatureException e) {
+                    Log.w(TAG, "Invalid Signature", e);
+                } catch (IOException e) {
+                    Log.w(TAG, "IO Exception", e);
+                } catch (CertificateException e) {
+                    Log.w(TAG, "Error occurred while loading certificates", e);
+                }
+                Log.d(TAG, "Signature: " + mSignatureStr);
+                return true;
+
+            case R.id.btn_verify_data:
+                boolean verified = false;
+                try {
+                    if (mSignatureStr != null) {
+                        verified = verifyData(SAMPLE_INPUT, mSignatureStr);
+                    }
+                } catch (KeyStoreException e) {
+                    Log.w(TAG, "KeyStore not Initialized", e);
+                } catch (CertificateException e) {
+                    Log.w(TAG, "Error occurred while loading certificates", e);
+                } catch (NoSuchAlgorithmException e) {
+                    Log.w(TAG, "RSA not supported", e);
+                } catch (IOException e) {
+                    Log.w(TAG, "IO Exception", e);
+                } catch (UnrecoverableEntryException e) {
+                    Log.w(TAG, "KeyPair not recovered", e);
+                } catch (InvalidKeyException e) {
+                    Log.w(TAG, "Invalid Key", e);
+                } catch (SignatureException e) {
+                    Log.w(TAG, "Invalid Signature", e);
+                }
+                if (verified) {
+                    Log.d(TAG, "Data Signature Verified");
+                } else {
+                    Log.d(TAG, "Data not verified.");
+                }
+                return true;
+        }
+        return false;
+    }
+
     /**
      * Creates a public and private key and stores it using the Android Key Store, so that only
      * this application will be able to access the keys.
@@ -74,20 +168,18 @@
                 new KeyPairGeneratorSpec.Builder(context)
                         // You'll use the alias later to retrieve the key.  It's a key for the key!
                         .setAlias(mAlias)
-                        // The subject used for the self-signed certificate of the generated pair
+                                // The subject used for the self-signed certificate of the generated pair
                         .setSubject(new X500Principal("CN=" + mAlias))
-                        // The serial number used for the self-signed certificate of the
-                        // generated pair.
+                                // The serial number used for the self-signed certificate of the
+                                // generated pair.
                         .setSerialNumber(BigInteger.valueOf(1337))
-                        // Date range of validity for the generated pair.
+                                // Date range of validity for the generated pair.
                         .setStartDate(start.getTime())
                         .setEndDate(end.getTime())
                         .build();
         // END_INCLUDE(create_spec)
 
-
         // BEGIN_INCLUDE(create_keypair)
-
         // Initialize a KeyPair generator using the the intended algorithm (in this example, RSA
         // and the KeyStore.  This example uses the AndroidKeyStore.
         KeyPairGenerator kpGenerator = KeyPairGenerator
@@ -97,8 +189,6 @@
         KeyPair kp = kpGenerator.generateKeyPair();
         Log.d(TAG, "Public Key is: " + kp.getPublic().toString());
         // END_INCLUDE(create_keypair)
-
-
     }
 
     /**
@@ -158,8 +248,7 @@
         // Sign the data, store the result as a Base64 encoded String.
         s.update(data);
         byte[] signature = s.sign();
-        String result = null;
-        result = Base64.encodeToString(signature, Base64.DEFAULT);
+        String result = Base64.encodeToString(signature, Base64.DEFAULT);
         // END_INCLUDE(sign_data)
 
         return result;
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SecurityConstants.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/SecurityConstants.java
similarity index 95%
rename from security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SecurityConstants.java
rename to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/SecurityConstants.java
index e23110c..ea5ee30 100644
--- a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/java/com/example/android/common/SecurityConstants.java
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/java/com/example/android/basicandroidkeystore/SecurityConstants.java
@@ -1,5 +1,3 @@
-package com.example.android.common;
-
 /*
  * Copyright 2013 The Android Open Source Project
  *
@@ -16,6 +14,8 @@
  * limitations under the License.
  */
 
+package com.example.android.basicandroidkeystore;
+
 /**
  * Helper class, contains several constants used when encrypting/decrypting data on Android.
  * This class should not be considered a complete list of the algorithms, keystore types,
@@ -30,5 +30,4 @@
 
     public static final String SIGNATURE_SHA256withRSA = "SHA256withRSA";
     public static final String SIGNATURE_SHA512withRSA = "SHA512withRSA";
-
 }
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/menu/main.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/menu/main.xml
similarity index 100%
rename from security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStore/src/main/res/menu/main.xml
rename to security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/menu/main.xml
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/values/strings.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/values/strings.xml
new file mode 100644
index 0000000..25ad389
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/src/main/res/values/strings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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="str_create_keys">Create</string>
+    <string name="str_sign_data">Sign</string>
+    <string name="str_verify_data">Verify</string>
+</resources>
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/AndroidManifest.xml b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/src/com/example/android/basicandroidkeystore/tests/SampleTests.java b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/src/com/example/android/basicandroidkeystore/tests/SampleTests.java
new file mode 100644
index 0000000..756b605
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/BasicAndroidKeyStoreSample/tests/src/com/example/android/basicandroidkeystore/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.basicandroidkeystore.tests;
+
+import com.example.android.basicandroidkeystore.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for BasicAndroidKeyStore sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private BasicAndroidKeyStoreFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (BasicAndroidKeyStoreFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/README.txt b/security/keystore/BasicAndroidKeyStore/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/security/keystore/BasicAndroidKeyStore/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/security/keystore/BasicAndroidKeyStore/build.gradle b/security/keystore/BasicAndroidKeyStore/build.gradle
index 036abc8..ffb5c2f 100644
--- a/security/keystore/BasicAndroidKeyStore/build.gradle
+++ b/security/keystore/BasicAndroidKeyStore/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/security/keystore/BasicAndroidKeyStore/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to security/keystore/BasicAndroidKeyStore/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/security/keystore/BasicAndroidKeyStore/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/security/keystore/BasicAndroidKeyStore/gradle/wrapper/gradle-wrapper.properties b/security/keystore/BasicAndroidKeyStore/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/security/keystore/BasicAndroidKeyStore/gradle/wrapper/gradle-wrapper.properties
+++ b/security/keystore/BasicAndroidKeyStore/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/security/keystore/BasicAndroidKeyStore/settings.gradle b/security/keystore/BasicAndroidKeyStore/settings.gradle
index 1d0b075..e4b36fe 100644
--- a/security/keystore/BasicAndroidKeyStore/settings.gradle
+++ b/security/keystore/BasicAndroidKeyStore/settings.gradle
@@ -1 +1,4 @@
-include ':BasicAndroidKeyStore'
+
+
+
+include 'BasicAndroidKeyStoreSample'
diff --git a/security/keystore/BasicAndroidKeyStore/template-params.xml b/security/keystore/BasicAndroidKeyStore/template-params.xml
new file mode 100644
index 0000000..2498b88
--- /dev/null
+++ b/security/keystore/BasicAndroidKeyStore/template-params.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>BasicAndroidKeyStore</name>
+    <package>com.example.android.basicandroidkeystore</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>18</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+                Welcome to the <b>Basic Android Key Store</b> sample!\n\n
+                This sample demonstrates how to use the Android Key Store to safely create and store
+                encryption keys that only your application can access.  You can also sign data
+                using those keys.\n\n
+                To create a new KeyPair, click \"Create\".\n\n
+                To sign some data using a KeyPair, click \"Sign\".\n\n
+                To verify the data using the signature provided, click \"Verify\".\n\n            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <template src="SimpleView"/>
+    <common src="activities"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/settings.gradle b/settings.gradle
deleted file mode 100644
index 45caa08..0000000
--- a/settings.gradle
+++ /dev/null
@@ -1,63 +0,0 @@
-include(
-  ':connectivity:bluetooth:BluetoothLeGatt:BluetoothLeGatt',
-  ':connectivity:bluetooth:BluetoothLeGatt',
-  ':connectivity:sync:BasicSyncAdapter',
-  ':connectivity:sync:BasicSyncAdapter:BasicSyncAdapter',
-  ':connectivity:network:BasicNetworkDemo:BasicNetworkDemo',
-  ':connectivity:network:BasicNetworkDemo',
-  ':connectivity:network:NetworkConnect:NetworkConnect',
-  ':connectivity:network:NetworkConnect',
-  ':content:multiuser:AppRestrictions:AppRestrictions',
-  ':content:multiuser:AppRestrictions',
-  ':content:contacts:BasicContactables:BasicContactables',
-  ':content:contacts:BasicContactables',
-  ':sampleSamples:BaseSample:BaseSampleSample',
-  ':sampleSamples:BaseSample',
-  ':sampleSamples:singleViewSample:singleViewSampleSample',
-  ':sampleSamples:singleViewSample',
-  ':sampleSamples:ActivityCards:ActivityCardsSample',
-  ':sampleSamples:ActivityCards',
-  ':ui:notifications:CustomNotifications:CustomNotifications',
-  ':ui:notifications:CustomNotifications',
-  ':ui:notifications:BasicNotifications:BasicNotifications',
-  ':ui:notifications:BasicNotifications',
-  ':ui:ImmersiveMode',
-  ':ui:ImmersiveMode:ImmersiveModeSample',
-  ':ui:actionbarcompat:ListPopupMenu:ListPopupMenu',
-  ':ui:actionbarcompat:ListPopupMenu',
-  ':ui:actionbarcompat:Styled:Styled',
-  ':ui:actionbarcompat:Styled',
-  ':ui:actionbarcompat:SearchView',
-  ':ui:actionbarcompat:ShareActionProvider:ShareActionProvider',
-  ':ui:actionbarcompat:ShareActionProvider',
-  ':ui:actionbarcompat:ListViewModalSelect',
-  ':ui:actionbarcompat:Basic',
-  ':ui:actionbarcompat:Basic:Basic',
-  ':ui:actionbar:DoneBar',
-  ':ui:actionbar:DoneBar:DoneBar',
-  ':ui:accessibility:BasicAccessibility:BasicAccessibility',
-  ':ui:accessibility:BasicAccessibility',
-  ':ui:lists:CustomChoiceList:CustomChoiceList',
-  ':ui:lists:CustomChoiceList',
-  ':ui:views:TextSwitcher:TextSwitcher',
-  ':ui:views:TextSwitcher',
-  ':ui:views:HorizontalPaging:HorizontalPaging',
-  ':ui:views:HorizontalPaging',
-  ':ui:holo:BorderlessButtons:BorderlessButtons',
-  ':ui:holo:BorderlessButtons',
-  ':security:keystore:BasicAndroidKeyStore:BasicAndroidKeyStore',
-  ':security:keystore:BasicAndroidKeyStore',
-  ':views:TextLinkify:TextLinkify',
-  ':views:TextLinkify',
-  ':background:alarms:repeatingAlarm',
-  ':background:alarms:repeatingAlarm:repeatingAlarmSample',
-  ':media:BasicMediaRouter:BasicMediaRouter',
-  ':media:BasicMediaRouter',
-  ':media:BasicMediaDecoder:BasicMediaDecoder',
-  ':media:BasicMediaDecoder',
-  ':media:MediaRecorder:MediaRecorder',
-  ':media:MediaRecorder',
-  ':input:multitouch:BasicMultitouch:BasicMultitouch',
-  ':input:multitouch:BasicMultitouch',
-  ':input:gestures:BasicGestureDetect:BasicGestureDetect',
-  ':input:gestures:BasicGestureDetect')
diff --git a/settings.gradle.old b/settings.gradle.old
deleted file mode 100644
index 03da487..0000000
--- a/settings.gradle.old
+++ /dev/null
@@ -1,63 +0,0 @@
-include(
-  ':connectivity:bluetooth:BluetoothLeGatt:BluetoothLeGatt',
-  ':connectivity:bluetooth:BluetoothLeGatt',
-  ':connectivity:sync:BasicSyncAdapter',
-  ':connectivity:sync:BasicSyncAdapter:BasicSyncAdapter',
-  ':connectivity:network:BasicNetworkDemo:BasicNetworkDemo',
-  ':connectivity:network:BasicNetworkDemo',
-  //':connectivity:network:NetworkConnect:NetworkConnect',
-  //':connectivity:network:NetworkConnect',
-  ':content:multiuser:AppRestrictions:AppRestrictions',
-  ':content:multiuser:AppRestrictions',
-  ':content:contacts:BasicContactables:BasicContactables',
-  ':content:contacts:BasicContactables',
-  ':sampleSamples:BaseSample:BaseSampleSample',
-  ':sampleSamples:BaseSample',
-  ':sampleSamples:singleViewSample:singleViewSampleSample',
-  ':sampleSamples:singleViewSample',
-  ':sampleSamples:ActivityCards:ActivityCardsSample',
-  ':sampleSamples:ActivityCards',
-  ':ui:notifications:CustomNotifications:CustomNotifications',
-  ':ui:notifications:CustomNotifications',
-  ':ui:notifications:BasicNotifications:BasicNotifications',
-  ':ui:notifications:BasicNotifications',
-  ':ui:ImmersiveMode',
-  ':ui:ImmersiveMode:ImmersiveModeSample',
-  ':ui:actionbarcompat:ListPopupMenu:ListPopupMenu',
-  ':ui:actionbarcompat:ListPopupMenu',
-  ':ui:actionbarcompat:Styled:Styled',
-  ':ui:actionbarcompat:Styled',
-  ':ui:actionbarcompat:SearchView',
-  ':ui:actionbarcompat:ShareActionProvider:ShareActionProvider',
-  ':ui:actionbarcompat:ShareActionProvider',
-  ':ui:actionbarcompat:ListViewModalSelect',
-  ':ui:actionbarcompat:Basic',
-  ':ui:actionbarcompat:Basic:Basic',
-  ':ui:actionbar:DoneBar',
-  ':ui:actionbar:DoneBar:DoneBar',
-  ':ui:accessibility:BasicAccessibility:BasicAccessibility',
-  ':ui:accessibility:BasicAccessibility',
-  ':ui:lists:CustomChoiceList:CustomChoiceList',
-  ':ui:lists:CustomChoiceList',
-  ':ui:views:TextSwitcher:TextSwitcher',
-  ':ui:views:TextSwitcher',
-  ':ui:views:HorizontalPaging:HorizontalPaging',
-  ':ui:views:HorizontalPaging',
-  ':ui:holo:BorderlessButtons:BorderlessButtons',
-  ':ui:holo:BorderlessButtons',
-  ':security:keystore:BasicAndroidKeyStore:BasicAndroidKeyStore',
-  ':security:keystore:BasicAndroidKeyStore',
-  ':views:TextLinkify:TextLinkify',
-  ':views:TextLinkify',
-  ':background:alarms:repeatingAlarm',
-  ':background:alarms:repeatingAlarm:repeatingAlarmSample',
-  ':media:BasicMediaRouter:BasicMediaRouter',
-  ':media:BasicMediaRouter',
-  ':media:BasicMediaDecoder:BasicMediaDecoder',
-  ':media:BasicMediaDecoder',
-  ':media:MediaRecorder:MediaRecorder',
-  ':media:MediaRecorder',
-  ':input:multitouch:BasicMultitouch:BasicMultitouch',
-  ':input:multitouch:BasicMultitouch',
-  ':input:gestures:BasicGestureDetect:BasicGestureDetect',
-  ':input:gestures:BasicGestureDetect')
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/.gitignore b/testing/ActivityInstrumentation/ActivityInstrumentationSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/testing/ActivityInstrumentation/ActivityInstrumentationSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/testing/ActivityInstrumentation/ActivityInstrumentationSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to testing/ActivityInstrumentation/ActivityInstrumentationSample/proguard-project.txt
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/AndroidManifest.xml
similarity index 62%
copy from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
copy to testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/AndroidManifest.xml
index 7e9a861..547d95e 100644
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
+++ b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/AndroidManifest.xml
@@ -1,11 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+     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,
@@ -13,24 +14,23 @@
  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.actionbarcompat.listpopupmenu"
+    package="com.example.android.activityinstrumentation"
     android:versionCode="1"
     android:versionName="1.0">
 
-    <!-- ActionBarCompat provides an implementation of Popup Menu from API v7 onwards -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
+    <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="17" />
 
-    <application
-        android:icon="@drawable/ic_launcher"
+    <application android:allowBackup="true"
         android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat"
-        android:allowBackup="true">
+        android:icon="@drawable/ic_launcher"
+        android:theme="@style/AppTheme">
 
-        <activity android:name=".MainActivity">
-            <!-- Launcher Intent filter -->
+        <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" />
@@ -38,4 +38,5 @@
         </activity>
     </application>
 
-</manifest>
\ No newline at end of file
+
+</manifest>
diff --git a/testing/ActivityInstrumentationSample/src/com/example/android/activityinstrumentation/MainActivity.java b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/java/com/example/android/activityinstrumentation/MainActivity.java
similarity index 98%
rename from testing/ActivityInstrumentationSample/src/com/example/android/activityinstrumentation/MainActivity.java
rename to testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/java/com/example/android/activityinstrumentation/MainActivity.java
index 39a7e37..39056ea 100644
--- a/testing/ActivityInstrumentationSample/src/com/example/android/activityinstrumentation/MainActivity.java
+++ b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/java/com/example/android/activityinstrumentation/MainActivity.java
@@ -16,9 +16,9 @@
 
 package com.example.android.activityinstrumentation;
 
+import android.app.Activity;
 import android.content.SharedPreferences;
 import android.os.Bundle;
-import android.app.Activity;
 import android.preference.PreferenceManager;
 import android.view.View;
 import android.widget.AdapterView;
@@ -67,7 +67,7 @@
         super.onCreate(savedInstanceState);
 
         // Inflate UI from res/layout/activity_main.xml
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
 
         // Get handle to default shared preferences for this activity
         mPrefs = PreferenceManager.getDefaultSharedPreferences(MainActivity.this);
@@ -98,7 +98,7 @@
             // statement and running the tests to watch them fail.
             @Override
             public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
-                mPrefs.edit().putInt(PREF_SPINNER_POS, position);
+                mPrefs.edit().putInt(PREF_SPINNER_POS, position).commit();
             }
 
             @Override
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/testing/ActivityInstrumentationSample/res/layout/activity_main.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from testing/ActivityInstrumentationSample/res/layout/activity_main.xml
rename to testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/layout/sample_main.xml
diff --git a/testing/ActivityInstrumentationSample/res/values-sw720dp-land/dimens.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from testing/ActivityInstrumentationSample/res/values-sw720dp-land/dimens.xml
rename to testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/testing/ActivityInstrumentationSample/res/values/dimens.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/dimens.xml
similarity index 100%
rename from testing/ActivityInstrumentationSample/res/values/dimens.xml
rename to testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/dimens.xml
diff --git a/testing/ActivityInstrumentationSample/res/values/strings.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/strings.xml
similarity index 91%
rename from testing/ActivityInstrumentationSample/res/values/strings.xml
rename to testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/strings.xml
index 8bf4747..4ed2243 100644
--- a/testing/ActivityInstrumentationSample/res/values/strings.xml
+++ b/testing/ActivityInstrumentation/ActivityInstrumentationSample/src/main/res/values/strings.xml
@@ -16,6 +16,5 @@
   -->
 
 <resources>
-    <string name="app_name">Activity Instrumentation Sample</string>
     <string name="instructions">The value of the spinner below should be persisted when this activity is destroyed.</string>
 </resources>
diff --git a/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/AndroidManifest.xml b/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/testing/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/MainActivityTest.java b/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/SampleTests.java
similarity index 92%
rename from testing/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/MainActivityTest.java
rename to testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/SampleTests.java
index fcffb01..3be1867 100644
--- a/testing/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/MainActivityTest.java
+++ b/testing/ActivityInstrumentation/ActivityInstrumentationSample/tests/src/com/example/android/activityinstrumentation/SampleTests.java
@@ -20,6 +20,9 @@
 import android.test.ActivityInstrumentationTestCase2;
 import android.widget.Spinner;
 
+import com.example.android.activityinstrumentation.MainActivity;
+import com.example.android.activityinstrumentation.R;
+
 /**
  * This is a simple framework for a test of an Application.  See
  * {@link android.test.ApplicationTestCase ApplicationTestCase} for more information on
@@ -28,7 +31,7 @@
  * <p>To run this test, you can type:
  * adb shell am instrument -w \
  * -e class com.example.android.activityinstrumentation.MainActivityTest \
- * com.example.android.activityinstrumentation.tests/android.test.InstrumentationTestRunner
+ * quux.tests/android.test.InstrumentationTestRunner
  *
  * <p>Individual tests are defined as any method beginning with 'test'.
  *
@@ -36,9 +39,9 @@
  * copy of the application under inspection. Calling getActivity() will return a
  * handle to this activity (launching it if needed).
  */
-public class MainActivityTest extends ActivityInstrumentationTestCase2<MainActivity> {
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
 
-    public MainActivityTest() {
+    public SampleTests() {
         super("com.example.android.activityinstrumentation", MainActivity.class);
     }
 
@@ -50,7 +53,7 @@
      */
     // BEGIN_INCLUDE (test_name)
     public void testSpinnerValuePersistedBetweenLaunches() {
-    // END_INCLUDE (test_name)
+        // END_INCLUDE (test_name)
         final int TEST_SPINNER_POSITION_1 = MainActivity.WEATHER_PARTLY_CLOUDY;
 
         // BEGIN_INCLUDE (launch_activity)
diff --git a/ui/ImmersiveMode/build.gradle b/testing/ActivityInstrumentation/build.gradle
similarity index 97%
rename from ui/ImmersiveMode/build.gradle
rename to testing/ActivityInstrumentation/build.gradle
index 5ed96a9..c886d80 100644
--- a/ui/ImmersiveMode/build.gradle
+++ b/testing/ActivityInstrumentation/build.gradle
@@ -1,3 +1,7 @@
+
+
+
+
 // BEGIN_EXCLUDE
 apply from: "../../../../build/build.gradle"
 samplegen {
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/testing/ActivityInstrumentation/buildSrc/build.gradle
similarity index 98%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to testing/ActivityInstrumentation/buildSrc/build.gradle
index 8c294c2..29282af 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/testing/ActivityInstrumentation/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
diff --git a/ui/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar b/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
copy from ui/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar
copy to testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/ui/ImmersiveMode/gradle/wrapper/gradle-wrapper.properties b/testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.properties
similarity index 100%
rename from ui/ImmersiveMode/gradle/wrapper/gradle-wrapper.properties
rename to testing/ActivityInstrumentation/gradle/wrapper/gradle-wrapper.properties
diff --git a/connectivity/network/BasicNetworkDemo/gradlew b/testing/ActivityInstrumentation/gradlew
similarity index 100%
copy from connectivity/network/BasicNetworkDemo/gradlew
copy to testing/ActivityInstrumentation/gradlew
diff --git a/connectivity/network/BasicNetworkDemo/gradlew.bat b/testing/ActivityInstrumentation/gradlew.bat
similarity index 100%
copy from connectivity/network/BasicNetworkDemo/gradlew.bat
copy to testing/ActivityInstrumentation/gradlew.bat
diff --git a/testing/ActivityInstrumentation/settings.gradle b/testing/ActivityInstrumentation/settings.gradle
new file mode 100644
index 0000000..0f010ba
--- /dev/null
+++ b/testing/ActivityInstrumentation/settings.gradle
@@ -0,0 +1,4 @@
+
+
+
+include 'ActivityInstrumentationSample'
diff --git a/testing/ActivityInstrumentation/template-params.xml b/testing/ActivityInstrumentation/template-params.xml
new file mode 100644
index 0000000..937e26e
--- /dev/null
+++ b/testing/ActivityInstrumentation/template-params.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>ActivityInstrumentation</name>
+    <package>com.example.android.com.example.android.activityinstrumentation</package>
+
+
+    <!-- change minSdk if needed-->
+    <minSdk>4</minSdk>
+
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample provides a basic example of using an InstrumentationTest to probe the
+            internal state of an Activity.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/testing/ActivityInstrumentationSample/AndroidManifest.xml b/testing/ActivityInstrumentationSample/AndroidManifest.xml
deleted file mode 100644
index 783fc0c..0000000
--- a/testing/ActivityInstrumentationSample/AndroidManifest.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ 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.
-  -->
-
-<!--
-     This manifest describes the application which we'll be testing. The actual instrumentation
-     tests are build a second APK, loaded alongside this one on the device.
-
-     See also: //tests/AndroidManifest.xml
--->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.activityinstrumentation"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk android:minSdkVersion="7"/>
-
-    <!-- This is just a standard activity. -->
-    <application
-            android:label="@string/app_name"
-            android:icon="@drawable/ic_launcher"
-            android:theme="@style/AppTheme">
-        <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>
-    </application>
-</manifest>
diff --git a/testing/ActivityInstrumentationSample/proguard-project.txt b/testing/ActivityInstrumentationSample/proguard-project.txt
deleted file mode 100644
index f2fe155..0000000
--- a/testing/ActivityInstrumentationSample/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/testing/ActivityInstrumentationSample/res/drawable-hdpi/ic_launcher.png b/testing/ActivityInstrumentationSample/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 96a442e..0000000
--- a/testing/ActivityInstrumentationSample/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/testing/ActivityInstrumentationSample/res/drawable-ldpi/ic_launcher.png b/testing/ActivityInstrumentationSample/res/drawable-ldpi/ic_launcher.png
deleted file mode 100644
index 9923872..0000000
--- a/testing/ActivityInstrumentationSample/res/drawable-ldpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/testing/ActivityInstrumentationSample/res/drawable-mdpi/ic_launcher.png b/testing/ActivityInstrumentationSample/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index 359047d..0000000
--- a/testing/ActivityInstrumentationSample/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/testing/ActivityInstrumentationSample/res/drawable-xhdpi/ic_launcher.png b/testing/ActivityInstrumentationSample/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 71c6d76..0000000
--- a/testing/ActivityInstrumentationSample/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/testing/ActivityInstrumentationSample/res/values-v11/styles.xml b/testing/ActivityInstrumentationSample/res/values-v11/styles.xml
deleted file mode 100644
index 1b39428..0000000
--- a/testing/ActivityInstrumentationSample/res/values-v11/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ 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>
-
-    <!--
-        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">
-        <!-- API 11 theme customizations can go here. -->
-    </style>
-
-</resources>
diff --git a/testing/ActivityInstrumentationSample/res/values-v14/styles.xml b/testing/ActivityInstrumentationSample/res/values-v14/styles.xml
deleted file mode 100644
index 219b706..0000000
--- a/testing/ActivityInstrumentationSample/res/values-v14/styles.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ 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>
-
-    <!--
-        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">
-        <!-- API 14 theme customizations can go here. -->
-    </style>
-
-</resources>
diff --git a/testing/ActivityInstrumentationSample/res/values/styles.xml b/testing/ActivityInstrumentationSample/res/values/styles.xml
deleted file mode 100644
index bdd3ba5..0000000
--- a/testing/ActivityInstrumentationSample/res/values/styles.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ 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>
-
-    <!--
-        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>
-
-</resources>
diff --git a/testing/ActivityInstrumentationSample/tests/AndroidManifest.xml b/testing/ActivityInstrumentationSample/tests/AndroidManifest.xml
deleted file mode 100644
index 1547109..0000000
--- a/testing/ActivityInstrumentationSample/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  ~ 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 name must be unique so suffix with "tests" so package loader doesn't ignore us -->
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="com.example.android.activityinstrumentation.tests"
-          android:versionCode="1"
-          android:versionName="1.0">
-    <!-- We add an application tag here just so that we can indicate that
-         this package needs to link against the android.test library,
-         which is needed when building test cases. -->
-    <application>
-        <uses-library android:name="android.test.runner" />
-    </application>
-    <!--
-    This declares that this application uses the instrumentation test runner targeting
-    the package of com.example.android.foohe tests use the command:
-    "adb shell am instrument -w com.example.android.foooid.test.InstrumentationTestRunner"
-    -->
-    <instrumentation android:name="android.test.InstrumentationTestRunner"
-                     android:targetPackage="com.example.android.activityinstrumentation"
-                     android:label="Tests for com.example.android.UnitTestSample"/>
-</manifest>
diff --git a/testing/ActivityInstrumentationSample/tests/proguard-project.txt b/testing/ActivityInstrumentationSample/tests/proguard-project.txt
deleted file mode 100644
index f2fe155..0000000
--- a/testing/ActivityInstrumentationSample/tests/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/.gitignore b/ui/ImmersiveMode/ImmersiveModeSample/.gitignore
deleted file mode 100644
index f52a120..0000000
--- a/ui/ImmersiveMode/ImmersiveModeSample/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-src/template/
-src/common/
-build.gradle
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/build.gradle b/ui/accessibility/BasicAccessibility/BasicAccessibility/build.gradle
deleted file mode 100644
index 10fb811..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/ic_launcher-web.png b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/ic_launcher-web.png
deleted file mode 100644
index 6967d3e..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/ic_launcher-web.png
+++ /dev/null
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-sw600dp/dimens.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-sw600dp/dimens.xml
deleted file mode 100644
index d0946b3..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-sw600dp/dimens.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--
-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/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v11/styles.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v11/styles.xml
deleted file mode 100644
index 5b1a3f2..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-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">
-        <!-- API 11 theme customizations can go here. -->
-    </style>
-
-</resources>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v14/styles.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v14/styles.xml
deleted file mode 100644
index b16c97b..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-v14/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-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/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/styles.xml b/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/styles.xml
deleted file mode 100644
index b0e6075..0000000
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
-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>
-
-</resources>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/.gitignore b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/proguard-project.txt
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/AndroidManifest.xml
similarity index 77%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/AndroidManifest.xml
index 3c0e66a..d61d789 100644
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/AndroidManifest.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright (C) 2013 The Android Open Source Project
+ 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
+     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,
@@ -15,10 +15,12 @@
  limitations under the License.
 -->
 
+
+
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.ui.accessibility.BasicAccessibility"
+    package="com.example.android.basicaccessibility"
     android:versionCode="1"
-    android:versionName="1.0" >
+    android:versionName="1.0">
 
     <uses-sdk
         android:minSdkVersion="11"
@@ -30,7 +32,7 @@
         android:label="@string/app_name"
         android:theme="@style/AppTheme" >
         <activity
-            android:name="com.example.android.ui.accessibility.BasicAccessibility.MainActivity"
+            android:name=".MainActivity"
             android:label="@string/app_name" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/DialView.java b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/DialView.java
similarity index 97%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/DialView.java
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/DialView.java
index 1fc5e0c..efdb449 100644
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/DialView.java
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/DialView.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.ui.accessibility.BasicAccessibility;
+package com.example.android.basicaccessibility;
 
 import android.annotation.TargetApi;
 import android.content.Context;
@@ -30,7 +30,7 @@
  * Custom view to demonstrate accessibility.
  *
  * <p>This view does not use any framework widgets, so does not get any accessibility features
- * automatically. Instead, we use {@link AccessibilityEvent} to provide accessibility hints to
+ * automatically. Instead, we use {@link android.view.accessibility.AccessibilityEvent} to provide accessibility hints to
  * the OS.
  *
  * <p>For example, if TalkBack is enabled, users will be able to receive spoken feedback as they
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/MainActivity.java b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/MainActivity.java
similarity index 91%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/MainActivity.java
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/MainActivity.java
index 869301d..2777ad7 100644
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/java/com/example/android/ui/accessibility/BasicAccessibility/MainActivity.java
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/java/com/example/android/basicaccessibility/MainActivity.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.ui.accessibility.BasicAccessibility;
+package com.example.android.basicaccessibility;
 
 import android.app.Activity;
 import android.os.Bundle;
@@ -34,6 +34,6 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
     }
 }
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_action_discard.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_action_discard.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_action_discard.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_action_discard.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_action_info.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_action_info.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_action_info.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_action_info.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_launcher.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/partly_cloudy.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/partly_cloudy.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-hdpi/partly_cloudy.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-hdpi/partly_cloudy.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_action_discard.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_action_discard.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_action_discard.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_action_discard.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_action_info.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_action_info.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_action_info.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_action_info.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_launcher.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_action_discard.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_action_discard.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_action_discard.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_action_discard.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_action_info.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_action_info.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_action_info.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_action_info.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/layout/activity_main.xml b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/layout/sample_main.xml
similarity index 98%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/layout/activity_main.xml
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/layout/sample_main.xml
index 394c72f..64f4f38 100644
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/layout/activity_main.xml
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/layout/sample_main.xml
@@ -192,7 +192,7 @@
 
             <!-- Custom views require additonal code changes. See DialView.java for more
                  details. -->
-            <com.example.android.ui.accessibility.BasicAccessibility.DialView
+            <com.example.android.basicaccessibility.DialView
                     android:layout_width="200dp"
                     android:layout_height="200dp"
                     android:id="@+id/dialView"
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-sw720dp-land/dimens.xml b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values-sw720dp-land/dimens.xml
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/dimens.xml b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values/dimens.xml
similarity index 100%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/dimens.xml
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values/dimens.xml
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/strings.xml b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values/strings.xml
similarity index 95%
rename from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/strings.xml
rename to ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values/strings.xml
index 57b8e49..8340682 100644
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/res/values/strings.xml
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/src/main/res/values/strings.xml
@@ -16,8 +16,6 @@
 -->
 
 <resources>
-
-    <string name="app_name" >Accessibility Sample</string>
     <string name="composeButtonPressed">(Compose button pressed.)</string>
     <string name="discardButtonPressed">(Discard button pressed.)</string>
     <string name="infoButtonPressed">(Info button pressed.)</string>
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/AndroidManifest.xml b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/src/com/example/android/basicaccessibility/tests/SampleTests.java b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/src/com/example/android/basicaccessibility/tests/SampleTests.java
new file mode 100644
index 0000000..0c9a152
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/BasicAccessibilitySample/tests/src/com/example/android/basicaccessibility/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.basicaccessibility.tests;
+
+import com.example.android.basicaccessibility.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for BasicAccessibility sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private BasicAccessibilityFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (BasicAccessibilityFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/ui/accessibility/BasicAccessibility/README.txt b/ui/accessibility/BasicAccessibility/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/ui/accessibility/BasicAccessibility/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/accessibility/BasicAccessibility/build.gradle b/ui/accessibility/BasicAccessibility/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/accessibility/BasicAccessibility/build.gradle
+++ b/ui/accessibility/BasicAccessibility/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/accessibility/BasicAccessibility/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/accessibility/BasicAccessibility/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/accessibility/BasicAccessibility/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/accessibility/BasicAccessibility/gradle/wrapper/gradle-wrapper.properties b/ui/accessibility/BasicAccessibility/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..5c22dec 100644
--- a/ui/accessibility/BasicAccessibility/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/accessibility/BasicAccessibility/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,4 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
diff --git a/ui/accessibility/BasicAccessibility/settings.gradle b/ui/accessibility/BasicAccessibility/settings.gradle
index 1c4fa86..7900b3d 100644
--- a/ui/accessibility/BasicAccessibility/settings.gradle
+++ b/ui/accessibility/BasicAccessibility/settings.gradle
@@ -1 +1,4 @@
-include ':BasicAccessibility'
+
+
+
+include 'BasicAccessibilitySample'
diff --git a/ui/accessibility/BasicAccessibility/template-params.xml b/ui/accessibility/BasicAccessibility/template-params.xml
new file mode 100644
index 0000000..bc87c3b
--- /dev/null
+++ b/ui/accessibility/BasicAccessibility/template-params.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>BasicAccessibility</name>
+    <package>com.example.android.basicaccessibility</package>
+
+
+    <!-- change minSdk if needed-->
+    <minSdk>11</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample demonstrates how to create an accessible application, using a mix of different widgets demonstrating different ways of adding accessibility markup to a UI.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/ui/actionbar/DoneBar/DoneBar/build.gradle b/ui/actionbar/DoneBar/DoneBar/build.gradle
deleted file mode 100644
index 9f4459b..0000000
--- a/ui/actionbar/DoneBar/DoneBar/build.gradle
+++ /dev/null
@@ -1,6 +0,0 @@
-apply plugin: 'android'
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/AndroidManifest.xml b/ui/actionbar/DoneBar/DoneBar/src/main/AndroidManifest.xml
deleted file mode 100755
index cce4d5e..0000000
--- a/ui/actionbar/DoneBar/DoneBar/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<!--
-  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=".SampleDashboardActivity"
-            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/DoneBar/src/main/big_icon.png b/ui/actionbar/DoneBar/DoneBar/src/main/big_icon.png
deleted file mode 100644
index 78bb426..0000000
--- a/ui/actionbar/DoneBar/DoneBar/src/main/big_icon.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/SampleDashboardActivity.java b/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/SampleDashboardActivity.java
deleted file mode 100755
index e86e6fc..0000000
--- a/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/SampleDashboardActivity.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * 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;
-import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.BaseAdapter;
-import android.widget.GridView;
-import android.widget.TextView;
-
-/**
- * A simple launcher activity offering access to the individual samples in this project.
- */
-public class SampleDashboardActivity extends Activity implements AdapterView.OnItemClickListener {
-    /**
-     * The collection of samples that will be used to populate the 'dashboard' grid.
-     */
-    private Sample[] mSamples;
-
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_sample_dashboard);
-
-        // Prepare list of samples in this dashboard.
-        mSamples = new Sample[]{
-                new Sample(R.string.done_bar_title, R.string.done_bar_description,
-                        DoneBarActivity.class),
-                new Sample(R.string.done_button_title, R.string.done_button_description,
-                        DoneButtonActivity.class),
-        };
-
-        // Use the custom adapter in the GridView and hook up a click listener to handle
-        // selection of individual samples.
-        GridView gridView = (GridView) findViewById(android.R.id.list);
-        gridView.setAdapter(new SampleAdapter());
-        gridView.setOnItemClickListener(this);
-    }
-
-    @Override
-    public void onItemClick(AdapterView<?> container, View view, int position, long id) {
-        // A sample was selected in the dashboard; open it.
-        startActivity(mSamples[position].intent);
-    }
-
-    /**
-     * A custom array-based adapter, designed for use with a {@link GridView}.
-     */
-    private class SampleAdapter extends BaseAdapter {
-        @Override
-        public int getCount() {
-            return mSamples.length;
-        }
-
-        @Override
-        public Sample getItem(int position) {
-            return mSamples[position];
-        }
-
-        @Override
-        public long getItemId(int position) {
-            // The title string ID should be unique per sample, so use it as an ID.
-            return mSamples[position].titleResId;
-        }
-
-        @Override
-        public View getView(int position, View convertView, ViewGroup container) {
-            if (convertView == null) {
-                // If there was no re-usable view that can be simply repopulated, create
-                // a new root view for this grid item.
-                convertView = getLayoutInflater().inflate(
-                        R.layout.sample_dashboard_item, container, false);
-            }
-
-            // Populate the view's children with real data about this sample.
-            ((TextView) convertView.findViewById(android.R.id.text1)).setText(
-                    mSamples[position].titleResId);
-            ((TextView) convertView.findViewById(android.R.id.text2)).setText(
-                    mSamples[position].descriptionResId);
-            return convertView;
-        }
-    }
-
-    /**
-     * A simple class that stores information about a sample: a title, description, and
-     * the intent to call
-     * {@link android.content.Context#startActivity(android.content.Intent) startActivity}
-     * with in order to open the sample.
-     */
-    private class Sample {
-        int titleResId;
-        int descriptionResId;
-        Intent intent;
-
-        /**
-         * Instantiate a new sample object with a title, description, and intent.
-         */
-        private Sample(int titleResId, int descriptionResId, Intent intent) {
-            this.intent = intent;
-            this.titleResId = titleResId;
-            this.descriptionResId = descriptionResId;
-        }
-
-        /**
-         * Instantiate a new sample object with a title, description, and {@link Activity}
-         * subclass. An intent will automatically be created for the given activity.
-         */
-        private Sample(int titleResId, int descriptionResId,
-                Class<? extends Activity> activityClass) {
-            this(titleResId, descriptionResId,
-                    new Intent(SampleDashboardActivity.this, activityClass));
-        }
-    }
-}
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/sample_dashboard_item_background.9.png b/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/sample_dashboard_item_background.9.png
deleted file mode 100644
index 1358628..0000000
--- a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/sample_dashboard_item_background.9.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/sample_dashboard_item.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/sample_dashboard_item.xml
deleted file mode 100644
index 38987ee..0000000
--- a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/sample_dashboard_item.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-  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"
-    style="@style/Widget.SampleDashboard.Item"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:orientation="vertical">
-
-    <TextView android:id="@android:id/text1"
-        style="@style/Widget.SampleDashboard.Item.Title"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content" />
-
-    <TextView android:id="@android:id/text2"
-        style="@style/Widget.SampleDashboard.Item.Description"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content" />
-</LinearLayout>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/styles.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/styles.xml
deleted file mode 100644
index 401e7aa..0000000
--- a/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/styles.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<!--
-  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.SampleMessage">
-        <item name="android:textAppearance">?android:textAppearanceLarge</item>
-        <item name="android:lineSpacingMultiplier">1.2</item>
-    </style>
-
-</resources>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/values/dimens.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/values/dimens.xml
deleted file mode 100644
index 39e710b..0000000
--- a/ui/actionbar/DoneBar/DoneBar/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-  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>
-
-    <!-- Semantic definitions -->
-
-    <dimen name="horizontal_page_margin">@dimen/margin_medium</dimen>
-    <dimen name="vertical_page_margin">@dimen/margin_medium</dimen>
-
-</resources>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/values/strings.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/values/strings.xml
deleted file mode 100755
index b56d75a..0000000
--- a/ui/actionbar/DoneBar/DoneBar/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-  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/DoneBar/src/main/res/values/styles.xml b/ui/actionbar/DoneBar/DoneBar/src/main/res/values/styles.xml
deleted file mode 100644
index f3841bd..0000000
--- a/ui/actionbar/DoneBar/DoneBar/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<!--
-  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:paddingTop">@dimen/vertical_page_margin</item>
-        <item name="android:paddingBottom">@dimen/vertical_page_margin</item>
-        <item name="android:paddingLeft">@dimen/horizontal_page_margin</item>
-        <item name="android:paddingRight">@dimen/horizontal_page_margin</item>
-    </style>
-
-    <style name="Widget.SampleMessage">
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-    <style name="Widget.SampleDashboard.Grid" parent="Widget">
-        <item name="android:stretchMode">columnWidth</item>
-        <item name="android:columnWidth">200dp</item>
-        <item name="android:numColumns">auto_fit</item>
-        <item name="android:drawSelectorOnTop">true</item>
-        <item name="android:horizontalSpacing">@dimen/margin_medium</item>
-        <item name="android:verticalSpacing">@dimen/margin_medium</item>
-    </style>
-
-    <style name="Widget.SampleDashboard.Item" parent="Widget">
-        <item name="android:background">@drawable/sample_dashboard_item_background</item>
-        <item name="android:paddingTop">@dimen/margin_small</item>
-        <item name="android:paddingLeft">@dimen/margin_medium</item>
-        <item name="android:paddingRight">@dimen/margin_medium</item>
-        <item name="android:paddingBottom">@dimen/margin_medium</item>
-    </style>
-
-    <style name="Widget.SampleDashboard.Item.Title" parent="Widget">
-        <item name="android:layout_marginBottom">@dimen/margin_tiny</item>
-        <item name="android:textAppearance">?android:textAppearanceLarge</item>
-        <item name="android:textColor">#09c</item>
-        <item name="android:textStyle">bold</item>
-        <item name="android:textSize">24sp</item>
-    </style>
-
-    <style name="Widget.SampleDashboard.Item.Description" parent="Widget">
-        <item name="android:textAppearance">?android:textAppearanceSmall</item>
-        <item name="android:fontFamily">sans-serif-light</item>
-    </style>
-
-</resources>
diff --git a/ui/actionbar/DoneBar/DoneBarSample/.gitignore b/ui/actionbar/DoneBar/DoneBarSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBarSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/actionbar/DoneBar/DoneBarSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/actionbar/DoneBar/DoneBarSample/proguard-project.txt
diff --git a/ui/actionbar/DoneBar/DoneBarSample/src/main/AndroidManifest.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..4731114
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBarSample/src/main/AndroidManifest.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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/DoneBar/src/main/java/com/example/android/donebar/DoneBarActivity.java b/ui/actionbar/DoneBar/DoneBarSample/src/main/java/com/example/android/donebar/DoneBarActivity.java
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/DoneBarActivity.java
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/java/com/example/android/donebar/DoneBarActivity.java
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/DoneButtonActivity.java b/ui/actionbar/DoneBar/DoneBarSample/src/main/java/com/example/android/donebar/DoneButtonActivity.java
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/java/com/example/android/donebar/DoneButtonActivity.java
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/java/com/example/android/donebar/DoneButtonActivity.java
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_action_cancel.png b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_action_cancel.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_action_cancel.png
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_action_cancel.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_action_done.png b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_action_done.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_action_done.png
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_action_done.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_action_cancel.png b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_action_cancel.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_action_cancel.png
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_action_cancel.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_action_done.png b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_action_done.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_action_done.png
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_action_done.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_action_cancel.png b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_action_cancel.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_action_cancel.png
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_action_cancel.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_action_done.png b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_action_done.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_action_done.png
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_action_done.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/actionbar_custom_view_done.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/actionbar_custom_view_done.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/layout/actionbar_custom_view_done.xml
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/actionbar_custom_view_done.xml
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/actionbar_custom_view_done_cancel.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/actionbar_custom_view_done_cancel.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/layout/actionbar_custom_view_done_cancel.xml
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/actionbar_custom_view_done_cancel.xml
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_bar.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_bar.xml
similarity index 94%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_bar.xml
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_bar.xml
index cb8980f..0d0272d 100755
--- a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_bar.xml
+++ b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_bar.xml
@@ -26,7 +26,7 @@
         <TextView style="@style/Widget.SampleMessage"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:text="@string/done_bar_description" />
+            android:text="@string/donebaractivity_description" />
 
     </LinearLayout>
 </ScrollView>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_button.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_button.xml
similarity index 94%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_button.xml
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_button.xml
index 3e20455..7fc2274 100755
--- a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_done_button.xml
+++ b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_done_button.xml
@@ -26,7 +26,7 @@
         <TextView style="@style/Widget.SampleMessage"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:text="@string/done_button_description" />
+            android:text="@string/donebuttonactivity_description" />
 
     </LinearLayout>
 </ScrollView>
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_sample_dashboard.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_sample_dashboard.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/layout/activity_sample_dashboard.xml
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/activity_sample_dashboard.xml
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/include_cancel_button.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/include_cancel_button.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/layout/include_cancel_button.xml
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/include_cancel_button.xml
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/layout/include_done_button.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/include_done_button.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/layout/include_done_button.xml
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/layout/include_done_button.xml
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/menu/cancel.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/menu/cancel.xml
similarity index 100%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/menu/cancel.xml
rename to ui/actionbar/DoneBar/DoneBarSample/src/main/res/menu/cancel.xml
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/values/strings.xml
old mode 100644
new mode 100755
similarity index 84%
copy from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml
copy to ui/actionbar/DoneBar/DoneBarSample/src/main/res/values/strings.xml
index 0e00174..df66a95
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml
+++ b/ui/actionbar/DoneBar/DoneBarSample/src/main/res/values/strings.xml
@@ -15,7 +15,7 @@
   -->
 
 <resources>
-
-    <dimen name="page_margin">@dimen/margin_huge</dimen>
-
+    <!-- Done bar strings -->
+    <string name="done">Done</string>
+    <string name="cancel">Cancel</string>
 </resources>
diff --git a/ui/actionbar/DoneBar/DoneBarSample/tests/AndroidManifest.xml b/ui/actionbar/DoneBar/DoneBarSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBarSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/ui/actionbar/DoneBar/DoneBarSample/tests/src/com/example/android/donebar/tests/SampleTests.java b/ui/actionbar/DoneBar/DoneBarSample/tests/src/com/example/android/donebar/tests/SampleTests.java
new file mode 100644
index 0000000..c019ef8
--- /dev/null
+++ b/ui/actionbar/DoneBar/DoneBarSample/tests/src/com/example/android/donebar/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.donebar.tests;
+
+import com.example.android.donebar.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for DoneBar sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private DoneBarFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (DoneBarFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/ui/actionbar/DoneBar/_index.jd b/ui/actionbar/DoneBar/_index.jd
new file mode 100644
index 0000000..287a04a
--- /dev/null
+++ b/ui/actionbar/DoneBar/_index.jd
@@ -0,0 +1,18 @@
+
+
+
+page.tags="DoneBar"
+sample.group=UI
+@jd:body
+
+<p>
+            
+                This sample demonstrates two alternative presentations of the
+                action bar that are well-suited for simple data entry scenarios.
+
+                In this presentation, a done bar 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.
+            
+        </p>
diff --git a/ui/actionbar/DoneBar/build.gradle b/ui/actionbar/DoneBar/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/actionbar/DoneBar/build.gradle
+++ b/ui/actionbar/DoneBar/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/actionbar/DoneBar/build.xml b/ui/actionbar/DoneBar/build.xml
deleted file mode 100644
index 1f0d8a1..0000000
--- a/ui/actionbar/DoneBar/build.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="SampleDashboardActivity" default="help">
-
-    <!-- The local.properties file is created and updated by the 'android' tool.
-         It contains the path to the SDK. It should *NOT* be checked into
-         Version Control Systems. -->
-    <property file="local.properties" />
-
-    <!-- The ant.properties file can be created by you. It is only edited by the
-         'android' tool to add properties to it.
-         This is the place to change some Ant specific build properties.
-         Here are some properties you may want to change/update:
-
-         source.dir
-             The name of the source directory. Default is 'src'.
-         out.dir
-             The name of the output directory. Default is 'bin'.
-
-         For other overridable properties, look at the beginning of the rules
-         files in the SDK, at tools/ant/build.xml
-
-         Properties related to the SDK location or the project target should
-         be updated using the 'android' tool with the 'update' action.
-
-         This file is an integral part of the build system for your
-         application and should be checked into Version Control Systems.
-
-         -->
-    <property file="ant.properties" />
-
-    <!-- if sdk.dir was not set from one of the property file, then
-         get it from the ANDROID_HOME env var.
-         This must be done before we load project.properties since
-         the proguard config can use sdk.dir -->
-    <property environment="env" />
-    <condition property="sdk.dir" value="${env.ANDROID_HOME}">
-        <isset property="env.ANDROID_HOME" />
-    </condition>
-
-    <!-- The project.properties file is created and updated by the 'android'
-         tool, as well as ADT.
-
-         This contains project specific properties such as project target, and library
-         dependencies. Lower level build properties are stored in ant.properties
-         (or in .classpath for Eclipse projects).
-
-         This file is an integral part of the build system for your
-         application and should be checked into Version Control Systems. -->
-    <loadproperties srcFile="project.properties" />
-
-    <!-- quick check on sdk.dir -->
-    <fail
-            message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
-            unless="sdk.dir"
-    />
-
-    <!--
-        Import per project custom build rules if present at the root of the project.
-        This is the place to put custom intermediary targets such as:
-            -pre-build
-            -pre-compile
-            -post-compile (This is typically used for code obfuscation.
-                           Compiled code location: ${out.classes.absolute.dir}
-                           If this is not done in place, override ${out.dex.input.absolute.dir})
-            -post-package
-            -post-build
-            -pre-clean
-    -->
-    <import file="custom_rules.xml" optional="true" />
-
-    <!-- Import the actual build file.
-
-         To customize existing targets, there are two options:
-         - Customize only one target:
-             - copy/paste the target into this file, *before* the
-               <import> task.
-             - customize it to your needs.
-         - Customize the whole content of build.xml
-             - copy/paste the content of the rules files (minus the top node)
-               into this file, replacing the <import> task.
-             - customize to your needs.
-
-         ***********************
-         ****** IMPORTANT ******
-         ***********************
-         In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
-         in order to avoid having your file be overridden by tools such as "android update project"
-    -->
-    <!-- version-tag: 1 -->
-    <import file="${sdk.dir}/tools/ant/build.xml" />
-
-</project>
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/actionbar/DoneBar/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/actionbar/DoneBar/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/actionbar/DoneBar/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/actionbar/DoneBar/gradle/wrapper/gradle-wrapper.properties b/ui/actionbar/DoneBar/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/ui/actionbar/DoneBar/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/actionbar/DoneBar/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/actionbar/DoneBar/proguard-project.txt b/ui/actionbar/DoneBar/proguard-project.txt
deleted file mode 100644
index f2fe155..0000000
--- a/ui/actionbar/DoneBar/proguard-project.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# To enable ProGuard in your project, edit project.properties
-# to define the proguard.config property as described in that file.
-#
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in ${sdk.dir}/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the ProGuard
-# include property in project.properties.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
diff --git a/ui/actionbar/DoneBar/project.properties b/ui/actionbar/DoneBar/project.properties
deleted file mode 100644
index a3ee5ab..0000000
--- a/ui/actionbar/DoneBar/project.properties
+++ /dev/null
@@ -1,14 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system edit
-# "ant.properties", and override values to adapt the script to your
-# project structure.
-#
-# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
-#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
-
-# Project target.
-target=android-17
diff --git a/ui/actionbar/DoneBar/settings.gradle b/ui/actionbar/DoneBar/settings.gradle
index 28b5ccd..d060dc7 100644
--- a/ui/actionbar/DoneBar/settings.gradle
+++ b/ui/actionbar/DoneBar/settings.gradle
@@ -1 +1,4 @@
-include ':DoneBar'
+
+
+
+include 'DoneBarSample'
diff --git a/ui/actionbar/DoneBar/template-params.xml b/ui/actionbar/DoneBar/template-params.xml
new file mode 100644
index 0000000..e343334
--- /dev/null
+++ b/ui/actionbar/DoneBar/template-params.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>DoneBar</name>
+    <group>UI</group>
+    <package>com.example.android.donebar</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>14</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+                This sample demonstrates two alternative presentations of the
+                action bar that are well-suited for simple data entry scenarios.
+
+                In this presentation, a done bar 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.
+            ]]>
+        </intro>
+    </strings>
+
+    <activity>
+        <class>DoneBarActivity</class>
+        <title>Done Bar</title>
+        <description>In this presentation, a done bar 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.</description>
+    </activity>
+
+    <activity>
+        <class>DoneButtonActivity</class>
+        <title>Done Button</title>
+        <description>In this presentation, a done button replaces the action bar\'s "Up" 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.</description>
+    </activity>
+
+    <template src="base"/>
+    <template src="ActivityCards"/>
+</sample>
diff --git a/ui/actionbarcompat/Basic/Basic/build.gradle b/ui/actionbarcompat/Basic/Basic/build.gradle
deleted file mode 100644
index 82ea162..0000000
--- a/ui/actionbarcompat/Basic/Basic/build.gradle
+++ /dev/null
@@ -1,11 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-    compile "com.android.support:appcompat-v7:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/AndroidManifest.xml b/ui/actionbarcompat/Basic/Basic/src/main/AndroidManifest.xml
deleted file mode 100644
index f0243ac..0000000
--- a/ui/actionbarcompat/Basic/Basic/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.actionbarcompat.basic"
-    android:versionCode="1"
-    android:versionName="1.0">
-
-    <!-- ActionBarCompat provides an Action Bar from API v7 onwards -->
-    <uses-sdk
-        android:minSdkVersion="7"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/Theme.AppCompat"
-        android:allowBackup="true">
-
-        <activity android:name=".MainActivity">
-            <!-- Launcher Intent filter -->
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-    </application>
-
-</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/values/strings.xml b/ui/actionbarcompat/Basic/Basic/src/main/res/values/strings.xml
deleted file mode 100644
index 5421e64..0000000
--- a/ui/actionbarcompat/Basic/Basic/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  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">ABC Basic</string>
-    <string name="menu_refresh">Refresh</string>
-    <string name="menu_location">Location</string>
-    <string name="menu_settings">Settings</string>
-    <string name="main_description">This is a basic Activity showing an
-        Action Bar. Items that are not shown as action items on the Action Bar are displayed in
-        the action bar overflow.</string>
-
-</resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/BasicSample/.gitignore b/ui/actionbarcompat/Basic/BasicSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/actionbarcompat/Basic/BasicSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/actionbarcompat/Basic/BasicSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/actionbarcompat/Basic/BasicSample/proguard-project.txt
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml b/ui/actionbarcompat/Basic/BasicSample/src/main/AndroidManifest.xml
similarity index 80%
copy from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
copy to ui/actionbarcompat/Basic/BasicSample/src/main/AndroidManifest.xml
index 7e9a861..332c055 100644
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
+++ b/ui/actionbarcompat/Basic/BasicSample/src/main/AndroidManifest.xml
@@ -1,11 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+     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,
@@ -13,12 +14,13 @@
  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.actionbarcompat.listpopupmenu"
+    package="com.example.android.actionbarcompat.basic"
     android:versionCode="1"
     android:versionName="1.0">
 
-    <!-- ActionBarCompat provides an implementation of Popup Menu from API v7 onwards -->
+    <!-- ActionBarCompat provides an Action Bar from API v7 onwards -->
     <uses-sdk
         android:minSdkVersion="7"
         android:targetSdkVersion="17" />
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/src/com/example/android/actionbarcompat/basic/MainActivity.java b/ui/actionbarcompat/Basic/BasicSample/src/main/java/com/example/android/actionbarcompat/basic/MainActivity.java
similarity index 98%
rename from ui/actionbarcompat/Basic/Basic/src/main/src/com/example/android/actionbarcompat/basic/MainActivity.java
rename to ui/actionbarcompat/Basic/BasicSample/src/main/java/com/example/android/actionbarcompat/basic/MainActivity.java
index eb63827..8d3506f 100644
--- a/ui/actionbarcompat/Basic/Basic/src/main/src/com/example/android/actionbarcompat/basic/MainActivity.java
+++ b/ui/actionbarcompat/Basic/BasicSample/src/main/java/com/example/android/actionbarcompat/basic/MainActivity.java
@@ -34,7 +34,7 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
     }
 
     // BEGIN_INCLUDE(create_menu)
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_location.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_location.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_refresh.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_settings.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_action_settings.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_location.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_location.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_refresh.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_settings.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_action_settings.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_location.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_location.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_refresh.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_settings.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_action_settings.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/layout/activity_main.xml b/ui/actionbarcompat/Basic/BasicSample/src/main/res/layout/sample_main.xml
similarity index 94%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/layout/activity_main.xml
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/layout/sample_main.xml
index 47619e0..ff589e1 100644
--- a/ui/actionbarcompat/Basic/Basic/src/main/res/layout/activity_main.xml
+++ b/ui/actionbarcompat/Basic/BasicSample/src/main/res/layout/sample_main.xml
@@ -18,5 +18,5 @@
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:padding="16dp"
-    android:text="@string/main_description"
+    android:text="@string/intro_message"
     android:gravity="center" />
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/menu/main.xml b/ui/actionbarcompat/Basic/BasicSample/src/main/res/menu/main.xml
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/menu/main.xml
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/menu/main.xml
diff --git a/ui/actionbarcompat/Basic/Basic/src/main/res/values/ids.xml b/ui/actionbarcompat/Basic/BasicSample/src/main/res/values/ids.xml
similarity index 100%
rename from ui/actionbarcompat/Basic/Basic/src/main/res/values/ids.xml
rename to ui/actionbarcompat/Basic/BasicSample/src/main/res/values/ids.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/values/strings.xml b/ui/actionbarcompat/Basic/BasicSample/src/main/res/values/strings.xml
similarity index 81%
copy from ui/actionbarcompat/Styled/Styled/src/main/res/values/strings.xml
copy to ui/actionbarcompat/Basic/BasicSample/src/main/res/values/strings.xml
index 63c7bb1..7867410 100644
--- a/ui/actionbarcompat/Styled/Styled/src/main/res/values/strings.xml
+++ b/ui/actionbarcompat/Basic/BasicSample/src/main/res/values/strings.xml
@@ -15,13 +15,7 @@
   limitations under the License.
 -->
 <resources>
-
-    <string name="app_name">ABC Styled</string>
     <string name="menu_refresh">Refresh</string>
     <string name="menu_location">Location</string>
     <string name="menu_settings">Settings</string>
-    <string name="main_description">This is a basic Activity showing an Action Bar which has been
-        styled.
-    </string>
-
 </resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/BasicSample/tests/AndroidManifest.xml b/ui/actionbarcompat/Basic/BasicSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/ui/actionbarcompat/Basic/BasicSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/BasicSample/tests/src/com/example/android/actionbarcompat/basic/tests/SampleTests.java b/ui/actionbarcompat/Basic/BasicSample/tests/src/com/example/android/actionbarcompat/basic/tests/SampleTests.java
new file mode 100644
index 0000000..8c1b2be
--- /dev/null
+++ b/ui/actionbarcompat/Basic/BasicSample/tests/src/com/example/android/actionbarcompat/basic/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.actionbarcompat.basic.tests;
+
+import com.example.android.actionbarcompat.basic.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for Basic sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private BasicFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (BasicFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/README.txt b/ui/actionbarcompat/Basic/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/ui/actionbarcompat/Basic/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/actionbarcompat/Basic/_index.jd b/ui/actionbarcompat/Basic/_index.jd
new file mode 100644
index 0000000..17ddfda
--- /dev/null
+++ b/ui/actionbarcompat/Basic/_index.jd
@@ -0,0 +1,15 @@
+
+
+
+page.tags="Basic"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+            This sample shows you how to use ActionBarCompat to create a basic Activity which
+            displays action items. It covers inflating items from a menu resource, as well as adding
+            an item in code. Items that are not shown as action items on the Action Bar are
+            displayed in the action bar overflow.
+            
+        </p>
diff --git a/ui/actionbarcompat/Basic/big_icon.png b/ui/actionbarcompat/Basic/big_icon.png
deleted file mode 100644
index 20f585a..0000000
--- a/ui/actionbarcompat/Basic/big_icon.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/Basic/build.gradle b/ui/actionbarcompat/Basic/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/actionbarcompat/Basic/build.gradle
+++ b/ui/actionbarcompat/Basic/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/actionbarcompat/Basic/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/actionbarcompat/Basic/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/actionbarcompat/Basic/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/actionbarcompat/Basic/gradle/wrapper/gradle-wrapper.properties b/ui/actionbarcompat/Basic/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/ui/actionbarcompat/Basic/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/actionbarcompat/Basic/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/actionbarcompat/Basic/settings.gradle b/ui/actionbarcompat/Basic/settings.gradle
index 56d763b..2f3a557 100644
--- a/ui/actionbarcompat/Basic/settings.gradle
+++ b/ui/actionbarcompat/Basic/settings.gradle
@@ -1 +1,4 @@
-include ':Basic'
+
+
+
+include 'BasicSample'
diff --git a/ui/actionbarcompat/Basic/template-params.xml b/ui/actionbarcompat/Basic/template-params.xml
new file mode 100644
index 0000000..da35301
--- /dev/null
+++ b/ui/actionbarcompat/Basic/template-params.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>Basic</name>
+    <group>NoGroup</group>
+    <package>com.example.android.actionbarcompat.basic</package>
+
+    <dependency>com.android.support:appcompat-v7:18.0.+</dependency>
+
+    <!-- change minSdk if needed-->
+    <minSdk>7</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample shows you how to use ActionBarCompat to create a basic Activity which
+            displays action items. It covers inflating items from a menu resource, as well as adding
+            an item in code. Items that are not shown as action items on the Action Bar are
+            displayed in the action bar overflow.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+
+</sample>
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/build.gradle b/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/build.gradle
deleted file mode 100644
index 82ea162..0000000
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/build.gradle
+++ /dev/null
@@ -1,11 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-    compile "com.android.support:appcompat-v7:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/.gitignore b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/proguard-project.txt
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/AndroidManifest.xml
similarity index 90%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/AndroidManifest.xml
index 7e9a861..114053e 100644
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/AndroidManifest.xml
+++ b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/AndroidManifest.xml
@@ -1,11 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+     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,
@@ -13,6 +14,7 @@
  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.actionbarcompat.listpopupmenu"
     android:versionCode="1"
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/Cheeses.java
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java
similarity index 90%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java
index 7fd05cc..13a77f3 100644
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java
+++ b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/MainActivity.java
@@ -17,10 +17,7 @@
 package com.example.android.actionbarcompat.listpopupmenu;
 
 import android.os.Bundle;
-import android.support.v4.view.MenuItemCompat;
 import android.support.v7.app.ActionBarActivity;
-import android.view.Menu;
-import android.view.MenuItem;
 
 /**
  * This sample shows you how to use {@link android.support.v7.widget.PopupMenu PopupMenu} from
@@ -38,7 +35,7 @@
         super.onCreate(savedInstanceState);
 
         // Set content view (which contains a PopupListFragment)
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
     }
 
 }
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/src/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/java/com/example/android/actionbarcompat/listpopupmenu/PopupListFragment.java
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-hdpi/ic_overflow.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-hdpi/ic_overflow.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-hdpi/ic_overflow.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-hdpi/ic_overflow.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-mdpi/ic_overflow.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-mdpi/ic_overflow.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-mdpi/ic_overflow.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-mdpi/ic_overflow.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xhdpi/ic_overflow.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xhdpi/ic_overflow.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xhdpi/ic_overflow.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xhdpi/ic_overflow.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/layout/list_item.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/layout/list_item.xml
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/layout/list_item.xml
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/layout/list_item.xml
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/layout/activity_main.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/layout/activity_main.xml
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/layout/sample_main.xml
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/menu/popup.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/menu/popup.xml
similarity index 100%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/menu/popup.xml
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/menu/popup.xml
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/values/strings.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/values/strings.xml
similarity index 92%
rename from ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/values/strings.xml
rename to ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/values/strings.xml
index 36233c9..e5784a9 100644
--- a/ui/actionbarcompat/ListPopupMenu/ListPopupMenu/src/main/res/values/strings.xml
+++ b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/src/main/res/values/strings.xml
@@ -16,7 +16,6 @@
 -->
 <resources>
 
-    <string name="app_name">ABC List Popup Menu</string>
     <string name="menu_remove">Remove</string>
     <string name="content_open_popup">Open Popup Menu</string>
 
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/AndroidManifest.xml b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/src/com/example/android/actionbarcompat/listpopupmenu/tests/SampleTests.java b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/src/com/example/android/actionbarcompat/listpopupmenu/tests/SampleTests.java
new file mode 100644
index 0000000..c91ae2e
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/ListPopupMenuSample/tests/src/com/example/android/actionbarcompat/listpopupmenu/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.actionbarcompat.listpopupmenu.tests;
+
+import com.example.android.actionbarcompat.listpopupmenu.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for ListPopupMenu sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private ListPopupMenuFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (ListPopupMenuFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListPopupMenu/README.txt b/ui/actionbarcompat/ListPopupMenu/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/ui/actionbarcompat/ListPopupMenu/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/actionbarcompat/ListPopupMenu/_index.jd b/ui/actionbarcompat/ListPopupMenu/_index.jd
new file mode 100644
index 0000000..00e6628
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/_index.jd
@@ -0,0 +1,13 @@
+
+
+
+page.tags="ListPopupMenu"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+            This sample shows you how to use {@link android.support.v7.widget.PopupMenu PopupMenu}
+            from ActionBarCompat to create a list, with each item having a dropdown menu.
+            
+        </p>
diff --git a/ui/actionbarcompat/ListPopupMenu/big_icon.png b/ui/actionbarcompat/ListPopupMenu/big_icon.png
deleted file mode 100644
index 6968ae8..0000000
--- a/ui/actionbarcompat/ListPopupMenu/big_icon.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/ListPopupMenu/build.gradle b/ui/actionbarcompat/ListPopupMenu/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/actionbarcompat/ListPopupMenu/build.gradle
+++ b/ui/actionbarcompat/ListPopupMenu/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/actionbarcompat/ListPopupMenu/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/actionbarcompat/ListPopupMenu/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/actionbarcompat/ListPopupMenu/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/actionbarcompat/ListPopupMenu/gradle/wrapper/gradle-wrapper.properties b/ui/actionbarcompat/ListPopupMenu/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/ui/actionbarcompat/ListPopupMenu/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/actionbarcompat/ListPopupMenu/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/actionbarcompat/ListPopupMenu/settings.gradle b/ui/actionbarcompat/ListPopupMenu/settings.gradle
index b354d69..c0f83ff 100644
--- a/ui/actionbarcompat/ListPopupMenu/settings.gradle
+++ b/ui/actionbarcompat/ListPopupMenu/settings.gradle
@@ -1 +1,4 @@
-include ':ListPopupMenu'
+
+
+
+include 'ListPopupMenuSample'
diff --git a/ui/actionbarcompat/ListPopupMenu/template-params.xml b/ui/actionbarcompat/ListPopupMenu/template-params.xml
new file mode 100644
index 0000000..4a67f36
--- /dev/null
+++ b/ui/actionbarcompat/ListPopupMenu/template-params.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>ListPopupMenu</name>
+    <group>NoGroup</group>
+    <package>com.example.android.actionbarcompat.listpopupmenu</package>
+
+    <dependency>com.android.support:appcompat-v7:18.0.+</dependency>
+
+    <!-- change minSdk if needed-->
+    <minSdk>7</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample shows you how to use {@link android.support.v7.widget.PopupMenu PopupMenu}
+            from ActionBarCompat to create a list, with each item having a dropdown menu.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+
+</sample>
diff --git a/ui/actionbarcompat/ShareActionProvider/README.txt b/ui/actionbarcompat/ShareActionProvider/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/ui/actionbarcompat/ShareActionProvider/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/build.gradle b/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/build.gradle
deleted file mode 100644
index 3538bea..0000000
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/build.gradle
+++ /dev/null
@@ -1,21 +0,0 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
-}
-
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-    compile "com.android.support:appcompat-v7:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/.gitignore b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/proguard-project.txt
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/AndroidManifest.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/AndroidManifest.xml
similarity index 65%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/AndroidManifest.xml
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/AndroidManifest.xml
index 8a5af4f..be1ed49 100644
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/AndroidManifest.xml
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/AndroidManifest.xml
@@ -1,18 +1,20 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2010 The Android Open Source Project
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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
+ 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
+     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.
+ 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.actionbarcompat.shareactionprovider"
     android:versionCode="1"
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_1.jpg b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_1.jpg
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_1.jpg
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_1.jpg
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_2.jpg b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_2.jpg
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_2.jpg
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_2.jpg
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_3.jpg b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_3.jpg
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/assets/photo_3.jpg
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/assets/photo_3.jpg
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java
similarity index 99%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java
index c651b39..b8cc900 100644
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/MainActivity.java
@@ -16,8 +16,6 @@
 
 package com.example.android.actionbarcompat.shareactionprovider;
 
-import com.example.android.actionbarcompat.shareactionprovider.content.ContentItem;
-
 import android.content.Intent;
 import android.os.Bundle;
 import android.support.v4.view.MenuItemCompat;
@@ -33,6 +31,8 @@
 import android.widget.ImageView;
 import android.widget.TextView;
 
+import com.example.android.actionbarcompat.shareactionprovider.content.ContentItem;
+
 import java.util.ArrayList;
 
 /**
@@ -59,7 +59,7 @@
         super.onCreate(savedInstanceState);
 
         // Set content view (which contains a CheeseListFragment)
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
 
         // Retrieve the ViewPager from the content view
         ViewPager vp = (ViewPager) findViewById(R.id.viewpager);
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/content/AssetProvider.java b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/content/AssetProvider.java
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/content/AssetProvider.java
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/content/AssetProvider.java
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java
similarity index 96%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java
index 09f8003..756a9e6 100644
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/src/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/java/com/example/android/actionbarcompat/shareactionprovider/content/ContentItem.java
@@ -72,7 +72,7 @@
     }
 
     /**
-     * Returns an {@link Intent} which can be used to share this item's content with other
+     * Returns an {@link android.content.Intent} which can be used to share this item's content with other
      * applications.
      *
      * @param context - Context to be used for fetching resources if needed
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/item_image.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/item_image.xml
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/item_image.xml
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/item_image.xml
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/item_text.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/item_text.xml
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/item_text.xml
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/item_text.xml
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/activity_main.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/layout/activity_main.xml
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/layout/sample_main.xml
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/menu/main_menu.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/menu/main_menu.xml
similarity index 100%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/menu/main_menu.xml
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/menu/main_menu.xml
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/values/strings.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/values/strings.xml
similarity index 82%
rename from ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/values/strings.xml
rename to ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/values/strings.xml
index d2b7ef8..298596f 100644
--- a/ui/actionbarcompat/ShareActionProvider/ShareActionProvider/src/main/res/values/strings.xml
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/src/main/res/values/strings.xml
@@ -15,15 +15,9 @@
   limitations under the License.
 -->
 <resources>
-
-    <string name="app_name">ABC ShareActionProvider</string>
-    <string name="intro_message">This sample demonstrates how to show a
-        <i>ShareActionProvider</i>, updated for the selected content.</string>
     <string name="menu_share">Share</string>
-
     <string name="quote_1">Expectation is the root of all heartache - William Shakespeare</string>
     <string name="quote_2">The true sign of intelligence is not knowledge but imagination - Albert
         Einstein</string>
     <string name="quote_3">As for me, all I know is that I know nothing - Socrates</string>
-
 </resources>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/AndroidManifest.xml b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/src/com/example/android/actionbarcompat/shareactionprovider/tests/SampleTests.java b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/src/com/example/android/actionbarcompat/shareactionprovider/tests/SampleTests.java
new file mode 100644
index 0000000..e655bcf
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/ShareActionProviderSample/tests/src/com/example/android/actionbarcompat/shareactionprovider/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.actionbarcompat.shareactionprovider.tests;
+
+import com.example.android.actionbarcompat.shareactionprovider.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for ShareActionProvider sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private ShareActionProviderFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (ShareActionProviderFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/ui/actionbarcompat/ShareActionProvider/_index.jd b/ui/actionbarcompat/ShareActionProvider/_index.jd
new file mode 100644
index 0000000..36784ff
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/_index.jd
@@ -0,0 +1,13 @@
+
+
+
+page.tags="ShareActionProvider"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+            This sample shows you how a provide a context-sensitive ShareActionProvider with
+            ActionBarCompat, backwards compatible to API v7.
+            
+        </p>
diff --git a/ui/actionbarcompat/ShareActionProvider/big_icon.png b/ui/actionbarcompat/ShareActionProvider/big_icon.png
deleted file mode 100644
index 7da0b23..0000000
--- a/ui/actionbarcompat/ShareActionProvider/big_icon.png
+++ /dev/null
Binary files differ
diff --git a/ui/actionbarcompat/ShareActionProvider/build.gradle b/ui/actionbarcompat/ShareActionProvider/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/actionbarcompat/ShareActionProvider/build.gradle
+++ b/ui/actionbarcompat/ShareActionProvider/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/actionbarcompat/ShareActionProvider/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/actionbarcompat/ShareActionProvider/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/actionbarcompat/ShareActionProvider/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/actionbarcompat/ShareActionProvider/gradle/wrapper/gradle-wrapper.properties b/ui/actionbarcompat/ShareActionProvider/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/ui/actionbarcompat/ShareActionProvider/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/actionbarcompat/ShareActionProvider/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/actionbarcompat/ShareActionProvider/settings.gradle b/ui/actionbarcompat/ShareActionProvider/settings.gradle
index 38418ad..92cd602 100644
--- a/ui/actionbarcompat/ShareActionProvider/settings.gradle
+++ b/ui/actionbarcompat/ShareActionProvider/settings.gradle
@@ -1 +1,4 @@
-include ':ShareActionProvider'
+
+
+
+include 'ShareActionProviderSample'
diff --git a/ui/actionbarcompat/ShareActionProvider/template-params.xml b/ui/actionbarcompat/ShareActionProvider/template-params.xml
new file mode 100644
index 0000000..722e830
--- /dev/null
+++ b/ui/actionbarcompat/ShareActionProvider/template-params.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>ShareActionProvider</name>
+    <group>NoGroup</group>
+    <package>com.example.android.actionbarcompat.shareactionprovider</package>
+
+    <dependency>com.android.support:appcompat-v7:18.0.+</dependency>
+
+    <!-- change minSdk if needed-->
+    <minSdk>7</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample shows you how a provide a context-sensitive ShareActionProvider with
+            ActionBarCompat, backwards compatible to API v7.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+
+</sample>
diff --git a/ui/actionbarcompat/Styled/README.txt b/ui/actionbarcompat/Styled/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/ui/actionbarcompat/Styled/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/actionbarcompat/Styled/Styled/build.gradle b/ui/actionbarcompat/Styled/Styled/build.gradle
deleted file mode 100644
index 3538bea..0000000
--- a/ui/actionbarcompat/Styled/Styled/build.gradle
+++ /dev/null
@@ -1,21 +0,0 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
-}
-
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-    compile "com.android.support:appcompat-v7:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/actionbarcompat/Styled/StyledSample/.gitignore b/ui/actionbarcompat/Styled/StyledSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/actionbarcompat/Styled/StyledSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/actionbarcompat/Styled/StyledSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/actionbarcompat/Styled/StyledSample/proguard-project.txt
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/AndroidManifest.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/AndroidManifest.xml
similarity index 68%
rename from ui/actionbarcompat/Styled/Styled/src/main/AndroidManifest.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/AndroidManifest.xml
index c51f234..06394c7 100644
--- a/ui/actionbarcompat/Styled/Styled/src/main/AndroidManifest.xml
+++ b/ui/actionbarcompat/Styled/StyledSample/src/main/AndroidManifest.xml
@@ -1,19 +1,20 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
-  Copyright 2013 The Android Open Source Project
+ 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
+ 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
+     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.
+ 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.actionbarcompat.styled"
     android:versionCode="1"
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/src/com/example/android/actionbarcompat/styled/MainActivity.java b/ui/actionbarcompat/Styled/StyledSample/src/main/java/com/example/android/actionbarcompat/styled/MainActivity.java
similarity index 98%
rename from ui/actionbarcompat/Styled/Styled/src/main/src/com/example/android/actionbarcompat/styled/MainActivity.java
rename to ui/actionbarcompat/Styled/StyledSample/src/main/java/com/example/android/actionbarcompat/styled/MainActivity.java
index c258827..19fe3a1 100644
--- a/ui/actionbarcompat/Styled/Styled/src/main/src/com/example/android/actionbarcompat/styled/MainActivity.java
+++ b/ui/actionbarcompat/Styled/StyledSample/src/main/java/com/example/android/actionbarcompat/styled/MainActivity.java
@@ -40,7 +40,7 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
 
         // Set the Action Bar to use tabs for navigation
         ActionBar ab = getSupportActionBar();
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_bottom_solid_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_bottom_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_bottom_solid_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_bottom_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_solid_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_solid_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_stacked_solid_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_stacked_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ab_stacked_solid_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ab_stacked_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_location.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_location.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_refresh.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_settings.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_action_settings.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_launcher.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/list_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/list_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/list_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/list_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/menu_dropdown_panel_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/menu_dropdown_panel_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/menu_dropdown_panel_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/menu_dropdown_panel_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_bg_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_bg_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_bg_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_bg_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_primary_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_primary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_primary_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_primary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_secondary_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_secondary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/progress_secondary_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/progress_secondary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_default_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_default_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_default_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_default_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_disabled_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_disabled_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_disabled_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_disabled_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_pressed_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/spinner_ab_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/spinner_ab_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_pressed_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_selected_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_selected_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_unselected_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_unselected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_unselected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_unselected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_unselected_pressed_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_unselected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-hdpi/tab_unselected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-hdpi/tab_unselected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_bottom_solid_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_bottom_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_bottom_solid_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_bottom_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_solid_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_solid_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_stacked_solid_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_stacked_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ab_stacked_solid_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ab_stacked_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_location.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_location.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_refresh.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_settings.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_action_settings.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_launcher.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/list_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/list_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/list_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/list_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/menu_dropdown_panel_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/menu_dropdown_panel_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/menu_dropdown_panel_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/menu_dropdown_panel_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_bg_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_bg_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_bg_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_bg_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_primary_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_primary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_primary_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_primary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_secondary_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_secondary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/progress_secondary_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/progress_secondary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_default_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_default_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_default_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_default_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_disabled_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_disabled_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_disabled_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_disabled_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_pressed_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/spinner_ab_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/spinner_ab_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_pressed_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_selected_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_selected_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_unselected_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_unselected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_unselected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_unselected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_unselected_pressed_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_unselected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-mdpi/tab_unselected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-mdpi/tab_unselected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_bottom_solid_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_bottom_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_bottom_solid_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_bottom_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_solid_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_solid_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_stacked_solid_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_stacked_solid_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ab_stacked_solid_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ab_stacked_solid_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_location.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_location.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_location.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_location.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_refresh.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_refresh.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_refresh.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_refresh.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_settings.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_settings.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_action_settings.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_action_settings.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/list_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/list_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/list_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/list_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/menu_dropdown_panel_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/menu_dropdown_panel_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/menu_dropdown_panel_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/menu_dropdown_panel_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_bg_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_bg_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_bg_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_bg_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_primary_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_primary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_primary_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_primary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_secondary_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_secondary_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/progress_secondary_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/progress_secondary_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_default_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_default_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_default_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_default_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_disabled_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_disabled_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_disabled_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_disabled_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_pressed_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/spinner_ab_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/spinner_ab_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_pressed_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_selected_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_selected_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_unselected_focused_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_unselected_focused_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_unselected_focused_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_unselected_focused_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_unselected_pressed_styled.9.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_unselected_pressed_styled.9.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xhdpi/tab_unselected_pressed_styled.9.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xhdpi/tab_unselected_pressed_styled.9.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable/pressed_background.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/pressed_background.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable/pressed_background.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/pressed_background.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable/progress_horizontal.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/progress_horizontal.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable/progress_horizontal.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/progress_horizontal.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable/selectable_background.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/selectable_background.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable/selectable_background.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/selectable_background.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable/spinner_background_ab.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/spinner_background_ab.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable/spinner_background_ab.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/spinner_background_ab.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/drawable/tab_indicator_ab.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/tab_indicator_ab.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/drawable/tab_indicator_ab.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/drawable/tab_indicator_ab.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/layout/activity_main.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/layout/activity_main.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/layout/sample_main.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/menu/main.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/menu/main.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/menu/main.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/menu/main.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/values-v14/styles.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/values-v14/styles.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/values-v14/styles.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/values-v14/styles.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/values/colors.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/values/colors.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/values/colors.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/values/colors.xml
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/values/strings.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/values/strings.xml
similarity index 94%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/values/strings.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/values/strings.xml
index 63c7bb1..de698d4 100644
--- a/ui/actionbarcompat/Styled/Styled/src/main/res/values/strings.xml
+++ b/ui/actionbarcompat/Styled/StyledSample/src/main/res/values/strings.xml
@@ -16,7 +16,6 @@
 -->
 <resources>
 
-    <string name="app_name">ABC Styled</string>
     <string name="menu_refresh">Refresh</string>
     <string name="menu_location">Location</string>
     <string name="menu_settings">Settings</string>
diff --git a/ui/actionbarcompat/Styled/Styled/src/main/res/values/styles.xml b/ui/actionbarcompat/Styled/StyledSample/src/main/res/values/styles.xml
similarity index 100%
rename from ui/actionbarcompat/Styled/Styled/src/main/res/values/styles.xml
rename to ui/actionbarcompat/Styled/StyledSample/src/main/res/values/styles.xml
diff --git a/ui/actionbarcompat/Styled/StyledSample/tests/AndroidManifest.xml b/ui/actionbarcompat/Styled/StyledSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/ui/actionbarcompat/Styled/StyledSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/ui/actionbarcompat/Styled/StyledSample/tests/src/com/example/android/actionbarcompat/styled/tests/SampleTests.java b/ui/actionbarcompat/Styled/StyledSample/tests/src/com/example/android/actionbarcompat/styled/tests/SampleTests.java
new file mode 100644
index 0000000..204afdc
--- /dev/null
+++ b/ui/actionbarcompat/Styled/StyledSample/tests/src/com/example/android/actionbarcompat/styled/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.actionbarcompat.styled.tests;
+
+import com.example.android.actionbarcompat.styled.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for Styled sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private StyledFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (StyledFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/ui/actionbarcompat/Styled/_index.jd b/ui/actionbarcompat/Styled/_index.jd
new file mode 100644
index 0000000..fd79264
--- /dev/null
+++ b/ui/actionbarcompat/Styled/_index.jd
@@ -0,0 +1,13 @@
+
+
+
+page.tags="Styled"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+            This sample shows you how to use ActionBarCompat with a customized theme. It utilizes a
+            split action bar when running on a device with a narrow display, and show three tabs.
+            
+        </p>
diff --git a/ui/actionbarcompat/Styled/build.gradle b/ui/actionbarcompat/Styled/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/actionbarcompat/Styled/build.gradle
+++ b/ui/actionbarcompat/Styled/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/actionbarcompat/Styled/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/actionbarcompat/Styled/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/actionbarcompat/Styled/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/actionbarcompat/Styled/gradle/wrapper/gradle-wrapper.properties b/ui/actionbarcompat/Styled/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/ui/actionbarcompat/Styled/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/actionbarcompat/Styled/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/actionbarcompat/Styled/settings.gradle b/ui/actionbarcompat/Styled/settings.gradle
index a515427..3e32af4 100644
--- a/ui/actionbarcompat/Styled/settings.gradle
+++ b/ui/actionbarcompat/Styled/settings.gradle
@@ -1 +1,4 @@
-include ':Styled'
+
+
+
+include 'StyledSample'
diff --git a/ui/actionbarcompat/Styled/template-params.xml b/ui/actionbarcompat/Styled/template-params.xml
new file mode 100644
index 0000000..d602051
--- /dev/null
+++ b/ui/actionbarcompat/Styled/template-params.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>Styled</name>
+    <group>NoGroup</group>
+    <package>com.example.android.actionbarcompat.styled</package>
+
+    <dependency>com.android.support:appcompat-v7:18.0.+</dependency>
+
+    <!-- change minSdk if needed-->
+    <minSdk>7</minSdk>
+
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample shows you how to use ActionBarCompat with a customized theme. It utilizes a
+            split action bar when running on a device with a narrow display, and show three tabs.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+
+</sample>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/build.gradle b/ui/holo/BorderlessButtons/BorderlessButtons/build.gradle
deleted file mode 100644
index 9f4459b..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtons/build.gradle
+++ /dev/null
@@ -1,6 +0,0 @@
-apply plugin: 'android'
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/big_icon.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/big_icon.png
deleted file mode 100644
index a8b32a9..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/big_icon.png
+++ /dev/null
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-hdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-hdpi/ic_launcher.png
deleted file mode 100644
index 05591fd..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-hdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-mdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-mdpi/ic_launcher.png
deleted file mode 100644
index ed81674..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-mdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xhdpi/ic_launcher.png
deleted file mode 100644
index 0fef898..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xxhdpi/ic_launcher.png
deleted file mode 100644
index cccd5d4..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xxhdpi/ic_launcher.png
+++ /dev/null
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/dimens.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/dimens.xml
deleted file mode 100644
index be5bb40..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
-  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>
-
-    <dimen name="standard_touch_target_size">48dp</dimen>
-
-    <!-- Meta-dimension that switches on screen size -->
-
-    <dimen name="page_margin">@dimen/margin_medium</dimen>
-
-</resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/styles.xml b/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/styles.xml
deleted file mode 100644
index 469816c..0000000
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<!--
-  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.DescriptionBar">
-        <item name="android:background">#fb3</item>
-        <item name="android:paddingTop">@dimen/margin_medium</item>
-        <item name="android:paddingBottom">@dimen/margin_medium</item>
-        <item name="android:paddingLeft">@dimen/page_margin</item>
-        <item name="android:paddingRight">@dimen/page_margin</item>
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-</resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtonsSample/.gitignore b/ui/holo/BorderlessButtons/BorderlessButtonsSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/holo/BorderlessButtons/BorderlessButtonsSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/holo/BorderlessButtons/BorderlessButtonsSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/holo/BorderlessButtons/BorderlessButtonsSample/proguard-project.txt
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/AndroidManifest.xml b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/AndroidManifest.xml
old mode 100755
new mode 100644
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/AndroidManifest.xml
rename to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/AndroidManifest.xml
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/java/com/example/android/borderlessbuttons/MainActivity.java b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/java/com/example/android/borderlessbuttons/MainActivity.java
similarity index 98%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/java/com/example/android/borderlessbuttons/MainActivity.java
rename to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/java/com/example/android/borderlessbuttons/MainActivity.java
index 9f27997..04105f4 100755
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/java/com/example/android/borderlessbuttons/MainActivity.java
+++ b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/java/com/example/android/borderlessbuttons/MainActivity.java
@@ -41,7 +41,7 @@
 
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
 
         setListAdapter(mListAdapter);
 
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-hdpi/ic_action_delete.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-hdpi/ic_action_delete.png
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-hdpi/ic_action_delete.png
rename to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-hdpi/ic_action_delete.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
copy to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-mdpi/ic_action_delete.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-mdpi/ic_action_delete.png
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-mdpi/ic_action_delete.png
rename to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-mdpi/ic_action_delete.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
copy to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xhdpi/ic_action_delete.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xhdpi/ic_action_delete.png
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/drawable-xhdpi/ic_action_delete.png
rename to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xhdpi/ic_action_delete.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
copy to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
copy to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/layout/list_item.xml b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/layout/list_item.xml
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/layout/list_item.xml
rename to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/layout/list_item.xml
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/layout/activity_main.xml b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/layout/activity_main.xml
rename to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/layout/sample_main.xml
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/menu/main.xml b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/menu/main.xml
similarity index 100%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/menu/main.xml
rename to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/menu/main.xml
diff --git a/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/dimens.xml b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/dimens.xml
similarity index 78%
rename from ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/dimens.xml
rename to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/dimens.xml
index 22074a2..71a1fc7 100644
--- a/ui/actionbar/DoneBar/DoneBar/src/main/res/values-sw600dp/dimens.xml
+++ b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/dimens.xml
@@ -16,9 +16,10 @@
 
 <resources>
 
-    <!-- Semantic definitions -->
+    <dimen name="standard_touch_target_size">48dp</dimen>
 
-    <dimen name="horizontal_page_margin">@dimen/margin_huge</dimen>
-    <dimen name="vertical_page_margin">@dimen/margin_medium</dimen>
+    <!-- Meta-dimension that switches on screen size -->
+
+    <dimen name="page_margin">@dimen/margin_medium</dimen>
 
 </resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/strings.xml b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/strings.xml
similarity index 80%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/strings.xml
rename to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/strings.xml
index c685088..fb141d2 100755
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values/strings.xml
+++ b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/strings.xml
@@ -15,9 +15,6 @@
   -->
 
 <resources>
-    <string name="app_name">Borderless Buttons</string>
-    <string name="intro_message">This sample demonstrates the use of <b>borderless buttons</b>, <b>bottom button bars</b> (<i>OK</i> and <i>Cancel</i>) and <b>dividers</b> to establish visual structure.</string>
-
     <string name="cancel">Cancel</string>
     <string name="ok">OK</string>
 
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/styles.xml b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/styles.xml
similarity index 90%
copy from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/styles.xml
copy to ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/styles.xml
index 9ce5eb3..36e0445 100644
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/styles.xml
+++ b/ui/holo/BorderlessButtons/BorderlessButtonsSample/src/main/res/values/styles.xml
@@ -16,14 +16,16 @@
 
 <resources>
 
+    <!-- Widget styling -->
+
     <style name="Widget.DescriptionBar">
         <item name="android:background">#fb3</item>
         <item name="android:paddingTop">@dimen/margin_medium</item>
         <item name="android:paddingBottom">@dimen/margin_medium</item>
         <item name="android:paddingLeft">@dimen/page_margin</item>
         <item name="android:paddingRight">@dimen/page_margin</item>
-        <item name="android:textAppearance">?android:textAppearanceLarge</item>
-        <item name="android:lineSpacingMultiplier">1.2</item>
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
     </style>
 
 </resources>
diff --git a/ui/holo/BorderlessButtons/README.txt b/ui/holo/BorderlessButtons/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/ui/holo/BorderlessButtons/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/holo/BorderlessButtons/_index.jd b/ui/holo/BorderlessButtons/_index.jd
new file mode 100644
index 0000000..2c17d3a
--- /dev/null
+++ b/ui/holo/BorderlessButtons/_index.jd
@@ -0,0 +1,11 @@
+
+
+
+page.tags="BorderlessButtons"
+sample.group=NoGroup
+@jd:body
+
+<p>
+        This sample demonstrates the use of borderless buttons, bottom button bars
+        (OK and Cancel) and dividers to establish visual structure.
+</p>
diff --git a/ui/holo/BorderlessButtons/build.gradle b/ui/holo/BorderlessButtons/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/holo/BorderlessButtons/build.gradle
+++ b/ui/holo/BorderlessButtons/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/holo/BorderlessButtons/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/holo/BorderlessButtons/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/holo/BorderlessButtons/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/holo/BorderlessButtons/gradle/wrapper/gradle-wrapper.properties b/ui/holo/BorderlessButtons/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/ui/holo/BorderlessButtons/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/holo/BorderlessButtons/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/holo/BorderlessButtons/settings.gradle b/ui/holo/BorderlessButtons/settings.gradle
index d543498..f5220c4 100644
--- a/ui/holo/BorderlessButtons/settings.gradle
+++ b/ui/holo/BorderlessButtons/settings.gradle
@@ -1 +1,4 @@
-include ':BorderlessButtons'
+
+
+
+include 'BorderlessButtonsSample'
diff --git a/ui/holo/BorderlessButtons/template-params.xml b/ui/holo/BorderlessButtons/template-params.xml
new file mode 100644
index 0000000..555782d
--- /dev/null
+++ b/ui/holo/BorderlessButtons/template-params.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<sample>
+    <name>BorderlessButtons</name>
+    <group>NoGroup</group>
+    <package>com.example.android.borderlessbuttons</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>14</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+                This sample demonstrates the use of borderless buttons, bottom button bars
+                (OK and Cancel) and dividers to establish visual structure.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/build.gradle b/ui/lists/CustomChoiceList/CustomChoiceList/build.gradle
deleted file mode 100644
index 3f765aa..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceList/build.gradle
+++ /dev/null
@@ -1,7 +0,0 @@
-
-apply plugin: 'android'
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/dimens.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/dimens.xml
deleted file mode 100644
index 0e00174..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/dimens.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-  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>
-
-    <dimen name="page_margin">@dimen/margin_huge</dimen>
-
-</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/styles.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/styles.xml
deleted file mode 100644
index 9ce5eb3..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-sw600dp/styles.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-  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.DescriptionBar">
-        <item name="android:background">#fb3</item>
-        <item name="android:paddingTop">@dimen/margin_medium</item>
-        <item name="android:paddingBottom">@dimen/margin_medium</item>
-        <item name="android:paddingLeft">@dimen/page_margin</item>
-        <item name="android:paddingRight">@dimen/page_margin</item>
-        <item name="android:textAppearance">?android:textAppearanceLarge</item>
-        <item name="android:lineSpacingMultiplier">1.2</item>
-    </style>
-
-</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-v11/styles.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-v11/styles.xml
deleted file mode 100644
index 3dff32a..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<!--
-  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="Theme.Base" parent="android:Theme.Holo.Light" />
-
-</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/dimens.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/dimens.xml
deleted file mode 100644
index 8bb8753..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/dimens.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<!--
-  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>
-
-    <!-- Meta-dimension that switches on screen size -->
-
-    <dimen name="page_margin">@dimen/margin_medium</dimen>
-
-</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/strings.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/strings.xml
deleted file mode 100755
index 54389e2..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<!--
-  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">Custom Choice List</string>
-    <string name="intro_message">This sample demonstrates how to create <b>custom checkable layouts</b>, for use with <i>ListView</i>\'s <i>choiceMode</i> attribute.</string>
-</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/styles.xml b/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/styles.xml
deleted file mode 100644
index e0a12d3..0000000
--- a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<!--
-  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.Light" />
-
-    <style name="Theme.Sample" parent="Theme.Base" />
-
-    <!-- Widget styling -->
-
-    <style name="Widget" />
-
-    <style name="Widget.DescriptionBar">
-        <item name="android:background">#fb3</item>
-        <item name="android:paddingTop">@dimen/margin_medium</item>
-        <item name="android:paddingBottom">@dimen/margin_medium</item>
-        <item name="android:paddingLeft">@dimen/page_margin</item>
-        <item name="android:paddingRight">@dimen/page_margin</item>
-        <item name="android:textAppearance">?android:textAppearanceMedium</item>
-        <item name="android:lineSpacingMultiplier">1.1</item>
-    </style>
-
-</resources>
diff --git a/ui/lists/CustomChoiceList/CustomChoiceListSample/.gitignore b/ui/lists/CustomChoiceList/CustomChoiceListSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/lists/CustomChoiceList/CustomChoiceListSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/lists/CustomChoiceList/CustomChoiceListSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/lists/CustomChoiceList/CustomChoiceListSample/proguard-project.txt
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/AndroidManifest.xml b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/AndroidManifest.xml
old mode 100755
new mode 100644
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/AndroidManifest.xml
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/AndroidManifest.xml
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java
similarity index 94%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java
index 97be8cb..a30eb2a 100644
--- a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java
+++ b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/CheckableLinearLayout.java
@@ -24,7 +24,7 @@
 import android.widget.LinearLayout;
 
 /**
- * This is a simple wrapper for {@link LinearLayout} that implements the {@link Checkable}
+ * This is a simple wrapper for {@link android.widget.LinearLayout} that implements the {@link android.widget.Checkable}
  * interface by keeping an internal 'checked' state flag.
  * <p>
  * This can be used as the root view for a custom list item layout for
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/Cheeses.java b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/Cheeses.java
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/Cheeses.java
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/Cheeses.java
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/MainActivity.java b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/MainActivity.java
similarity index 97%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/MainActivity.java
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/MainActivity.java
index e27ff97..e4e89f2 100755
--- a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/java/com/example/android/customchoicelist/MainActivity.java
+++ b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/java/com/example/android/customchoicelist/MainActivity.java
@@ -31,7 +31,7 @@
 public class MainActivity extends ListActivity {
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
         setListAdapter(new MyAdapter());
     }
 
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/color/hideable_text_color.xml b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/color/hideable_text_color.xml
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/color/hideable_text_color.xml
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/color/hideable_text_color.xml
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-hdpi/ic_launcher.png b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-mdpi/ic_launcher.png b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_hideable_item_checked.png b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_hideable_item_checked.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_hideable_item_checked.png
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_hideable_item_checked.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_hideable_item_unchecked.png b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_hideable_item_unchecked.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_hideable_item_unchecked.png
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_hideable_item_unchecked.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable/ic_hideable_item.xml b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable/ic_hideable_item.xml
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/drawable/ic_hideable_item.xml
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/drawable/ic_hideable_item.xml
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/layout/list_item.xml b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/layout/list_item.xml
similarity index 96%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/layout/list_item.xml
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/layout/list_item.xml
index ecbd63d..09a17ed 100644
--- a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/layout/list_item.xml
+++ b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/layout/list_item.xml
@@ -15,7 +15,7 @@
   -->
 
 <!--
-    The ListView from activity_main.xml has a choiceMode set, meaning that when a user
+    The ListView from sample_main.xml has a choiceMode set, meaning that when a user
     selects a list item, the ListView will set the state for that item's root view
     (this CheckableLinearLayout) to "checked". Note that this requires that the root view
     implements the Checkable interface. Once the root view is checked, any children that
diff --git a/ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/layout/activity_main.xml b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from ui/lists/CustomChoiceList/CustomChoiceList/src/main/res/layout/activity_main.xml
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/layout/sample_main.xml
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/dimens.xml
similarity index 84%
copy from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml
copy to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/dimens.xml
index 0e00174..c22027e 100644
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/dimens.xml
+++ b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/dimens.xml
@@ -16,6 +16,8 @@
 
 <resources>
 
-    <dimen name="page_margin">@dimen/margin_huge</dimen>
+    <!-- Meta-dimension that switches on screen size -->
+
+    <dimen name="page_margin">@dimen/margin_medium</dimen>
 
 </resources>
diff --git a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/styles.xml b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/styles.xml
similarity index 92%
rename from ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/styles.xml
rename to ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/styles.xml
index 9ce5eb3..0851a81 100644
--- a/ui/holo/BorderlessButtons/BorderlessButtons/src/main/res/values-sw600dp/styles.xml
+++ b/ui/lists/CustomChoiceList/CustomChoiceListSample/src/main/res/values/styles.xml
@@ -15,15 +15,14 @@
   -->
 
 <resources>
-
     <style name="Widget.DescriptionBar">
         <item name="android:background">#fb3</item>
         <item name="android:paddingTop">@dimen/margin_medium</item>
         <item name="android:paddingBottom">@dimen/margin_medium</item>
         <item name="android:paddingLeft">@dimen/page_margin</item>
         <item name="android:paddingRight">@dimen/page_margin</item>
-        <item name="android:textAppearance">?android:textAppearanceLarge</item>
-        <item name="android:lineSpacingMultiplier">1.2</item>
+        <item name="android:textAppearance">?android:textAppearanceMedium</item>
+        <item name="android:lineSpacingMultiplier">1.1</item>
     </style>
 
 </resources>
diff --git a/ui/lists/CustomChoiceList/README.txt b/ui/lists/CustomChoiceList/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/ui/lists/CustomChoiceList/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/lists/CustomChoiceList/build.gradle b/ui/lists/CustomChoiceList/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/lists/CustomChoiceList/build.gradle
+++ b/ui/lists/CustomChoiceList/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/lists/CustomChoiceList/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/lists/CustomChoiceList/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/lists/CustomChoiceList/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/lists/CustomChoiceList/gradle/wrapper/gradle-wrapper.properties b/ui/lists/CustomChoiceList/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/ui/lists/CustomChoiceList/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/lists/CustomChoiceList/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/lists/CustomChoiceList/settings.gradle b/ui/lists/CustomChoiceList/settings.gradle
index 0c9c7b4..6d876cf 100644
--- a/ui/lists/CustomChoiceList/settings.gradle
+++ b/ui/lists/CustomChoiceList/settings.gradle
@@ -1 +1,4 @@
-include ':CustomChoiceList'
+
+
+
+include 'CustomChoiceListSample'
diff --git a/ui/lists/CustomChoiceList/template-params.xml b/ui/lists/CustomChoiceList/template-params.xml
new file mode 100644
index 0000000..3275535
--- /dev/null
+++ b/ui/lists/CustomChoiceList/template-params.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>CustomChoiceList</name>
+    <group>NoGroup</group>
+    <package>com.example.android.customchoicelist</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>3</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+                This sample demonstrates how to create custom checkable layouts, for use with ListView\'s choiceMode
+                attribute.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/build.gradle b/ui/notifications/BasicNotifications/BasicNotifications/build.gradle
deleted file mode 100644
index 10fb811..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/AndroidManifest.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/AndroidManifest.xml
deleted file mode 100644
index 5193ae6..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-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.basicnotifications"
-          android:versionCode="1"
-          android:versionName="1.0">
-
-    <uses-sdk
-        android:minSdkVersion="8"
-        android:targetSdkVersion="17"/>
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme">
-        <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>
-    </application>
-
-</manifest>
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/big_icon.png b/ui/notifications/BasicNotifications/BasicNotifications/src/main/big_icon.png
deleted file mode 100644
index 38a25ae..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/big_icon.png
+++ /dev/null
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v11/styles.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v11/styles.xml
deleted file mode 100644
index a55cffb..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-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>
-
-    <!--
-        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">
-        <!-- API 11 theme customizations can go here. -->
-    </style>
-
-</resources>
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v14/styles.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v14/styles.xml
deleted file mode 100644
index e010230..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values-v14/styles.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-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>
-
-    <!--
-        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">
-        <!-- API 14 theme customizations can go here. -->
-    </style>
-
-</resources>
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/styles.xml b/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/styles.xml
deleted file mode 100644
index 916d51a..0000000
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-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>
-
-    <!--
-        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>
-
-
-</resources>
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/.gitignore b/ui/notifications/BasicNotifications/BasicNotificationsSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/notifications/BasicNotifications/BasicNotificationsSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/notifications/BasicNotifications/BasicNotificationsSample/proguard-project.txt
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/AndroidManifest.xml
similarity index 65%
copy from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
copy to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/AndroidManifest.xml
index 3c0e66a..1e37d0b 100644
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/AndroidManifest.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright (C) 2013 The Android Open Source Project
+ 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
+     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,
@@ -16,25 +16,25 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.ui.accessibility.BasicAccessibility"
+    package="com.example.android.basicnotifications"
     android:versionCode="1"
-    android:versionName="1.0" >
+    android:versionName="1.0">
 
     <uses-sdk
-        android:minSdkVersion="11"
-        android:targetSdkVersion="16" />
+        android:minSdkVersion="8"
+        android:targetSdkVersion="17"/>
 
     <application
         android:allowBackup="true"
         android:icon="@drawable/ic_launcher"
         android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
+        android:theme="@style/AppTheme">
         <activity
-            android:name="com.example.android.ui.accessibility.BasicAccessibility.MainActivity"
-            android:label="@string/app_name" >
+            android:name=".MainActivity"
+            android:label="@string/app_name">
             <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
+                <action android:name="android.intent.action.MAIN"/>
+                <category android:name="android.intent.category.LAUNCHER"/>
             </intent-filter>
         </activity>
     </application>
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/java/com/example/android/basicnotifications/MainActivity.java b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/java/com/example/android/basicnotifications/MainActivity.java
similarity index 98%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/java/com/example/android/basicnotifications/MainActivity.java
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/java/com/example/android/basicnotifications/MainActivity.java
index 50ac798..3e78c34 100644
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/java/com/example/android/basicnotifications/MainActivity.java
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/java/com/example/android/basicnotifications/MainActivity.java
@@ -23,7 +23,7 @@
 
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.main_layout);
+        setContentView(R.layout.sample_layout);
 
     }
 
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-hdpi/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-hdpi/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-ldpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-ldpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-mdpi/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-mdpi/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v11/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi-v9/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_stat_notification.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_stat_notification.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xhdpi/ic_stat_notification.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xhdpi/ic_stat_notification.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/layout/main_layout.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/layout/sample_layout.xml
similarity index 100%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/layout/main_layout.xml
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/layout/sample_layout.xml
diff --git a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/strings.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/values/strings.xml
similarity index 96%
rename from ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/strings.xml
rename to ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/values/strings.xml
index d9300ef..075f681 100644
--- a/ui/notifications/BasicNotifications/BasicNotifications/src/main/res/values/strings.xml
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/src/main/res/values/strings.xml
@@ -16,7 +16,6 @@
 -->
 <resources>
 
-    <string name="app_name">Basic Notifications</string>
     <string name="description">
         Tap the button below to send a notification.\n\nThe notification\'s icon will immediately
         appear in the notification bar. Drag the notification bar open to see the full
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/AndroidManifest.xml b/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/src/com/example/android/basicnotifications/tests/SampleTests.java b/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/src/com/example/android/basicnotifications/tests/SampleTests.java
new file mode 100644
index 0000000..ffe5840
--- /dev/null
+++ b/ui/notifications/BasicNotifications/BasicNotificationsSample/tests/src/com/example/android/basicnotifications/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.basicnotifications.tests;
+
+import com.example.android.basicnotifications.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for BasicNotifications sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private BasicNotificationsFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (BasicNotificationsFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/ui/notifications/BasicNotifications/README.txt b/ui/notifications/BasicNotifications/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/ui/notifications/BasicNotifications/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/notifications/BasicNotifications/_index.jd b/ui/notifications/BasicNotifications/_index.jd
new file mode 100644
index 0000000..9556b29
--- /dev/null
+++ b/ui/notifications/BasicNotifications/_index.jd
@@ -0,0 +1,14 @@
+
+
+
+page.tags="BasicNotifications"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+            This sample demonstrates how to display events in the system\'s notification bar. The
+            NotificationCompat API is used for compatibility with older devices, running Android
+            2.2 (Froyo) or newer.
+            
+        </p>
diff --git a/ui/notifications/BasicNotifications/build.gradle b/ui/notifications/BasicNotifications/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/notifications/BasicNotifications/build.gradle
+++ b/ui/notifications/BasicNotifications/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/notifications/BasicNotifications/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/notifications/BasicNotifications/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/notifications/BasicNotifications/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties b/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/notifications/BasicNotifications/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/notifications/BasicNotifications/settings.gradle b/ui/notifications/BasicNotifications/settings.gradle
index 6f0df94..b33d67f 100644
--- a/ui/notifications/BasicNotifications/settings.gradle
+++ b/ui/notifications/BasicNotifications/settings.gradle
@@ -1 +1,4 @@
-include ':BasicNotifications'
+
+
+
+include 'BasicNotificationsSample'
diff --git a/ui/notifications/BasicNotifications/template-params.xml b/ui/notifications/BasicNotifications/template-params.xml
new file mode 100644
index 0000000..2d8776f
--- /dev/null
+++ b/ui/notifications/BasicNotifications/template-params.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<sample>
+    <name>BasicNotifications</name>
+    <group>NoGroup</group>
+    <package>com.example.android.basicnotifications</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>8</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample demonstrates how to display events in the system\'s notification bar. The
+            NotificationCompat API is used for compatibility with older devices, running Android
+            2.2 (Froyo) or newer.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+</sample>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/build.gradle b/ui/notifications/CustomNotifications/CustomNotifications/build.gradle
deleted file mode 100644
index a6f0afc..0000000
--- a/ui/notifications/CustomNotifications/CustomNotifications/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile 'com.android.support:support-v4:18.0.+'
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/AndroidManifest.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/AndroidManifest.xml
deleted file mode 100644
index 8821b1a..0000000
--- a/ui/notifications/CustomNotifications/CustomNotifications/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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/res/values-v11/styles.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v11/styles.xml
deleted file mode 100644
index b454dee..0000000
--- a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-  * 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
deleted file mode 100644
index 1cf1112..0000000
--- a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v14/styles.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-  * 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/styles.xml b/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/styles.xml
deleted file mode 100644
index eca4340..0000000
--- a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,39 +0,0 @@
-<!--
-  * 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/CustomNotificationsSample/.gitignore b/ui/notifications/CustomNotifications/CustomNotificationsSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/notifications/CustomNotifications/CustomNotificationsSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/notifications/CustomNotifications/CustomNotificationsSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/notifications/CustomNotifications/CustomNotificationsSample/proguard-project.txt
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/AndroidManifest.xml
similarity index 72%
copy from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
copy to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/AndroidManifest.xml
index 3c0e66a..b20a411 100644
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
+++ b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/AndroidManifest.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright (C) 2013 The Android Open Source Project
+ 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
+     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,
@@ -15,14 +15,16 @@
  limitations under the License.
 -->
 
+
+
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.ui.accessibility.BasicAccessibility"
+    package="com.example.android.customnotifications"
     android:versionCode="1"
-    android:versionName="1.0" >
+    android:versionName="1.0">
 
     <uses-sdk
-        android:minSdkVersion="11"
-        android:targetSdkVersion="16" />
+        android:minSdkVersion="4"
+        android:targetSdkVersion="18" />
 
     <application
         android:allowBackup="true"
@@ -30,10 +32,11 @@
         android:label="@string/app_name"
         android:theme="@style/AppTheme" >
         <activity
-            android:name="com.example.android.ui.accessibility.BasicAccessibility.MainActivity"
+            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>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/java/com/example/android/customnotifications/MainActivity.java b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/java/com/example/android/customnotifications/MainActivity.java
similarity index 91%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/java/com/example/android/customnotifications/MainActivity.java
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/java/com/example/android/customnotifications/MainActivity.java
index eae95f1..57a4315 100644
--- a/ui/notifications/CustomNotifications/CustomNotifications/src/main/java/com/example/android/customnotifications/MainActivity.java
+++ b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/java/com/example/android/customnotifications/MainActivity.java
@@ -35,11 +35,11 @@
      *
      * <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>
+     * The expanded content view is set directly on the {@link android.app.Notification} once it has been build.
+     * (See {@link android.app.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>
+     * <p>The content views are inflated as {@link android.widget.RemoteViews} directly from their XML layout
+     * definitions using {@link android.widget.RemoteViews#RemoteViews(String, int)}.</p>
      */
     private void createNotification() {
         // BEGIN_INCLUDE(notificationCompat)
@@ -109,7 +109,7 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
     }
 
     /**
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v11/ic_stat_custom.png b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-hdpi-v11/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v11/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-hdpi-v9/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi-v9/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-hdpi/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-hdpi/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-ldpi-v11/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v11/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-ldpi-v9/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-ldpi-v9/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-mdpi-v11/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v11/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-mdpi-v9/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi-v9/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-mdpi/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-mdpi/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v11/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi-v9/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-xhdpi/ic_stat_custom.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/ic_stat_custom.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-xhdpi/robot.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-xhdpi/robot_expanded.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xhdpi/robot_expanded.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/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/CustomNotificationsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/notification.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification.xml
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/notification.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification_expanded.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/notification_expanded.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/notification_expanded.xml
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/notification_expanded.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/activity_main.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/layout/activity_main.xml
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/layout/sample_main.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw720dp-land/dimens.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw720dp-land/dimens.xml
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v9/styles.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values-v9/styles.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-v9/styles.xml
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values-v9/styles.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/dimens.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/dimens.xml
similarity index 100%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/dimens.xml
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/dimens.xml
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/strings.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/strings.xml
similarity index 96%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/strings.xml
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/strings.xml
index 3247f39..a766441 100644
--- a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values/strings.xml
+++ b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/strings.xml
@@ -16,7 +16,6 @@
 
 <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>
diff --git a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw600dp/dimens.xml b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/styles.xml
similarity index 77%
rename from ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw600dp/dimens.xml
rename to ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/styles.xml
index eb7d98a..1d3d45b 100644
--- a/ui/notifications/CustomNotifications/CustomNotifications/src/main/res/values-sw600dp/dimens.xml
+++ b/ui/notifications/CustomNotifications/CustomNotificationsSample/src/main/res/values/styles.xml
@@ -14,6 +14,9 @@
   -->
 
 <resources>
-    <!-- Customize dimensions originally defined in res/values/dimens.xml (such as
-         screen margins) for sw600dp devices (e.g. 7" tablets) here. -->
+
+    <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
index 5a6276f..ffb5c2f 100644
--- a/ui/notifications/CustomNotifications/build.gradle
+++ b/ui/notifications/CustomNotifications/build.gradle
@@ -1,13 +1,11 @@
-// 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()
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/notifications/CustomNotifications/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/notifications/CustomNotifications/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/notifications/CustomNotifications/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar b/ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
copy from ui/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar
copy to ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties b/ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.properties
similarity index 80%
copy from connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
copy to ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/notifications/CustomNotifications/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/ImmersiveMode/gradlew b/ui/notifications/CustomNotifications/gradlew
similarity index 100%
copy from ui/ImmersiveMode/gradlew
copy to ui/notifications/CustomNotifications/gradlew
diff --git a/ui/ImmersiveMode/gradlew.bat b/ui/notifications/CustomNotifications/gradlew.bat
similarity index 100%
copy from ui/ImmersiveMode/gradlew.bat
copy to ui/notifications/CustomNotifications/gradlew.bat
diff --git a/ui/notifications/CustomNotifications/settings.gradle b/ui/notifications/CustomNotifications/settings.gradle
index f19c616..71d4992 100644
--- a/ui/notifications/CustomNotifications/settings.gradle
+++ b/ui/notifications/CustomNotifications/settings.gradle
@@ -1 +1,4 @@
-include ':CustomNotifications'
+
+
+
+include 'CustomNotificationsSample'
diff --git a/ui/notifications/CustomNotifications/template-params.xml b/ui/notifications/CustomNotifications/template-params.xml
new file mode 100644
index 0000000..279522c
--- /dev/null
+++ b/ui/notifications/CustomNotifications/template-params.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>CustomNotifications</name>
+    <group>UI</group>
+    <package>com.example.android.customnotifications</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>4</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample demonstrates notifications with custom content views.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+
+</sample>
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/build.gradle b/ui/views/HorizontalPaging/HorizontalPaging/build.gradle
deleted file mode 100644
index 10fb811..0000000
--- a/ui/views/HorizontalPaging/HorizontalPaging/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/AndroidManifest.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/AndroidManifest.xml
deleted file mode 100644
index 4359521..0000000
--- a/ui/views/HorizontalPaging/HorizontalPaging/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.horizontalpaging"
-    android:versionCode="1"
-    android:versionName="1.0" >
-
-    <!-- While ViewPager will work on API 4 or above, tabs require an ActionBar. ActionBar is only
-         available in API 11 or above. -->
-    <uses-sdk
-        android:minSdkVersion="11"
-        android:targetSdkVersion="16" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-    <!-- This is a standard Activity invocation for MainActivity. -->
-    <activity
-        android:name="com.example.android.horizontalpaging.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/views/HorizontalPaging/HorizontalPaging/src/main/res/values-sw600dp/dimens.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-sw600dp/dimens.xml
deleted file mode 100644
index 886b05f..0000000
--- a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-sw600dp/dimens.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<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/views/HorizontalPaging/HorizontalPaging/src/main/res/values-v11/styles.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-v11/styles.xml
deleted file mode 100644
index 3c02242..0000000
--- a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<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">
-        <!-- API 11 theme customizations can go here. -->
-    </style>
-
-</resources>
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/styles.xml b/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/styles.xml
deleted file mode 100644
index 6ce89c7..0000000
--- a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<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>
-
-</resources>
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/.gitignore b/ui/views/HorizontalPaging/HorizontalPagingSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPagingSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/views/HorizontalPaging/HorizontalPagingSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/views/HorizontalPaging/HorizontalPagingSample/proguard-project.txt
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/AndroidManifest.xml
similarity index 71%
copy from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
copy to ui/views/HorizontalPaging/HorizontalPagingSample/src/main/AndroidManifest.xml
index 3c0e66a..33b9e15 100644
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
+++ b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/AndroidManifest.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright (C) 2013 The Android Open Source Project
+ 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
+     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,
@@ -16,10 +16,12 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.ui.accessibility.BasicAccessibility"
+    package="com.example.android.horizontalpaging"
     android:versionCode="1"
     android:versionName="1.0" >
 
+    <!-- While ViewPager will work on API 4 or above, tabs require an ActionBar. ActionBar is only
+         available in API 11 or above. -->
     <uses-sdk
         android:minSdkVersion="11"
         android:targetSdkVersion="16" />
@@ -29,11 +31,13 @@
         android:icon="@drawable/ic_launcher"
         android:label="@string/app_name"
         android:theme="@style/AppTheme" >
+        <!-- This is a standard Activity invocation for MainActivity. -->
         <activity
-            android:name="com.example.android.ui.accessibility.BasicAccessibility.MainActivity"
+            android:name="com.example.android.horizontalpaging.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>
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/java/com/example/android/horizontalpaging/MainActivity.java b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/java/com/example/android/horizontalpaging/MainActivity.java
similarity index 94%
rename from ui/views/HorizontalPaging/HorizontalPaging/src/main/java/com/example/android/horizontalpaging/MainActivity.java
rename to ui/views/HorizontalPaging/HorizontalPagingSample/src/main/java/com/example/android/horizontalpaging/MainActivity.java
index 2cdca42..fdd4495 100644
--- a/ui/views/HorizontalPaging/HorizontalPaging/src/main/java/com/example/android/horizontalpaging/MainActivity.java
+++ b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/java/com/example/android/horizontalpaging/MainActivity.java
@@ -1,7 +1,5 @@
 package com.example.android.horizontalpaging;
 
-import java.util.Locale;
-
 import android.app.ActionBar;
 import android.app.FragmentTransaction;
 import android.os.Bundle;
@@ -9,16 +7,14 @@
 import android.support.v4.app.FragmentActivity;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentPagerAdapter;
-import android.support.v4.app.NavUtils;
 import android.support.v4.view.ViewPager;
-import android.view.Gravity;
 import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuItem;
 import android.view.View;
 import android.view.ViewGroup;
 import android.widget.TextView;
 
+import java.util.Locale;
+
 public class MainActivity extends FragmentActivity implements ActionBar.TabListener {
 
     /**
@@ -37,7 +33,7 @@
     ViewPager mViewPager;
 
     /**
-     * Create the activity. Sets up an {@link ActionBar} with tabs, and then configures the
+     * Create the activity. Sets up an {@link android.app.ActionBar} with tabs, and then configures the
      * {@link ViewPager} contained inside R.layout.activity_main.
      *
      * <p>A {@link SectionsPagerAdapter} will be instantiated to hold the different pages of
@@ -51,7 +47,7 @@
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         // Load the UI from res/layout/activity_main.xml
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
 
         // Set up the action bar. The navigation mode is set to NAVIGATION_MODE_TABS, which will
         // cause the ActionBar to render a set of tabs. Note that these tabs are *not* rendered
@@ -101,7 +97,7 @@
      * Update {@link ViewPager} after a tab has been selected in the ActionBar.
      *
      * @param tab Tab that was selected.
-     * @param fragmentTransaction A {@link FragmentTransaction} for queuing fragment operations to
+     * @param fragmentTransaction A {@link android.app.FragmentTransaction} for queuing fragment operations to
      *                            execute once this method returns. This FragmentTransaction does
      *                            not support being added to the back stack.
      */
@@ -114,14 +110,14 @@
     // END_INCLUDE (on_tab_selected)
 
     /**
-     * Unused. Required for {@link ActionBar.TabListener}.
+     * Unused. Required for {@link android.app.ActionBar.TabListener}.
      */
     @Override
     public void onTabUnselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
     }
 
     /**
-     * Unused. Required for {@link ActionBar.TabListener}.
+     * Unused. Required for {@link android.app.ActionBar.TabListener}.
      */
     @Override
     public void onTabReselected(ActionBar.Tab tab, FragmentTransaction fragmentTransaction) {
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-hdpi/ic_launcher.png b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-mdpi/ic_launcher.png b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPaging/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/layout/fragment_main_dummy.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/layout/fragment_main_dummy.xml
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPaging/src/main/res/layout/fragment_main_dummy.xml
rename to ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/layout/fragment_main_dummy.xml
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/layout/activity_main.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPaging/src/main/res/layout/activity_main.xml
rename to ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/layout/sample_main.xml
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/dimens.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/dimens.xml
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/dimens.xml
rename to ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/dimens.xml
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/strings.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/strings.xml
similarity index 81%
rename from ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/strings.xml
rename to ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/strings.xml
index ec05e06..f9b4212 100644
--- a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values/strings.xml
+++ b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/strings.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
 
-    <string name="app_name">Horizontal Paging Sample</string>
     <string name="action_settings">Settings</string>
     <string name="title_section1">Section 1</string>
     <string name="title_section2">Section 2</string>
diff --git a/ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-sw720dp-land/dimens.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/values-sw720dp-land/dimens.xml
similarity index 100%
rename from ui/views/HorizontalPaging/HorizontalPaging/src/main/res/values-sw720dp-land/dimens.xml
rename to ui/views/HorizontalPaging/HorizontalPagingSample/src/main/res/values/values-sw720dp-land/dimens.xml
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/tests/AndroidManifest.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPagingSample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/ui/views/HorizontalPaging/HorizontalPagingSample/tests/src/com/example/android/horizontalpaging/tests/SampleTests.java b/ui/views/HorizontalPaging/HorizontalPagingSample/tests/src/com/example/android/horizontalpaging/tests/SampleTests.java
new file mode 100644
index 0000000..206eea9
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPagingSample/tests/src/com/example/android/horizontalpaging/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.horizontalpaging.tests;
+
+import com.example.android.horizontalpaging.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for HorizontalPaging sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private HorizontalPagingFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (HorizontalPagingFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/ui/views/HorizontalPaging/README.txt b/ui/views/HorizontalPaging/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/ui/views/HorizontalPaging/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/views/HorizontalPaging/_index.jd b/ui/views/HorizontalPaging/_index.jd
new file mode 100644
index 0000000..160621e
--- /dev/null
+++ b/ui/views/HorizontalPaging/_index.jd
@@ -0,0 +1,13 @@
+
+
+
+page.tags="HorizontalPaging"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+            This sample demonstrates how to implement horizontal paging between fragments in
+            applications that use ActionBar, using a ViewPager widget.
+            
+        </p>
diff --git a/ui/views/HorizontalPaging/build.gradle b/ui/views/HorizontalPaging/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/views/HorizontalPaging/build.gradle
+++ b/ui/views/HorizontalPaging/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/views/HorizontalPaging/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/views/HorizontalPaging/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/views/HorizontalPaging/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/views/HorizontalPaging/gradle/wrapper/gradle-wrapper.properties b/ui/views/HorizontalPaging/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/ui/views/HorizontalPaging/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/views/HorizontalPaging/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/views/HorizontalPaging/settings.gradle b/ui/views/HorizontalPaging/settings.gradle
index 892a596..f70f0f1 100644
--- a/ui/views/HorizontalPaging/settings.gradle
+++ b/ui/views/HorizontalPaging/settings.gradle
@@ -1 +1,4 @@
-include ':HorizontalPaging'
+
+
+
+include 'HorizontalPagingSample'
diff --git a/ui/views/HorizontalPaging/template-params.xml b/ui/views/HorizontalPaging/template-params.xml
new file mode 100644
index 0000000..28fc0db
--- /dev/null
+++ b/ui/views/HorizontalPaging/template-params.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>HorizontalPaging</name>
+    <group>NoGroup</group>
+    <package>com.example.android.horizontalpaging</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>11</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample demonstrates how to implement horizontal paging between fragments in
+            applications that use ActionBar, using a ViewPager widget.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+
+</sample>
diff --git a/ui/views/TextSwitcher/README.txt b/ui/views/TextSwitcher/README.txt
deleted file mode 100644
index 38608df..0000000
--- a/ui/views/TextSwitcher/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Build Instructions
--------------------
-This sample uses the Gradle build system. To build this project, use the
-"gradlew build" command.
-
-To see a list of all available commands, run "gradlew tasks".
\ No newline at end of file
diff --git a/ui/views/TextSwitcher/TextSwitcher/build.gradle b/ui/views/TextSwitcher/TextSwitcher/build.gradle
deleted file mode 100644
index 10fb811..0000000
--- a/ui/views/TextSwitcher/TextSwitcher/build.gradle
+++ /dev/null
@@ -1,10 +0,0 @@
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/styles.xml b/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/styles.xml
deleted file mode 100644
index 27efa47..0000000
--- a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
-  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>
-
-    <!--
-        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>
-
-</resources>
diff --git a/ui/views/TextSwitcher/TextSwitcherSample/.gitignore b/ui/views/TextSwitcher/TextSwitcherSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/views/TextSwitcher/TextSwitcherSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/views/TextSwitcher/TextSwitcherSample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to ui/views/TextSwitcher/TextSwitcherSample/proguard-project.txt
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/AndroidManifest.xml b/ui/views/TextSwitcher/TextSwitcherSample/src/main/AndroidManifest.xml
similarity index 90%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/AndroidManifest.xml
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/AndroidManifest.xml
index 707bfe3..7f512a3 100644
--- a/ui/views/TextSwitcher/TextSwitcher/src/main/AndroidManifest.xml
+++ b/ui/views/TextSwitcher/TextSwitcherSample/src/main/AndroidManifest.xml
@@ -16,7 +16,7 @@
 -->
 
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.view.textswitcher"
+    package="com.example.android.textswitcher"
     android:versionCode="1"
     android:versionName="1.0" >
 
@@ -30,7 +30,7 @@
         android:label="@string/app_name"
         android:theme="@style/AppTheme" >
         <activity
-            android:name="com.example.android.ui.views.textswitcher.MainActivity"
+            android:name=".MainActivity"
             android:label="@string/app_name" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/java/com/example/android/ui/views/textswitcher/MainActivity.java b/ui/views/TextSwitcher/TextSwitcherSample/src/main/java/com/example/android/textswitcher/MainActivity.java
similarity index 83%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/java/com/example/android/ui/views/textswitcher/MainActivity.java
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/java/com/example/android/textswitcher/MainActivity.java
index 1beeb59..a8cbb5e 100644
--- a/ui/views/TextSwitcher/TextSwitcher/src/main/java/com/example/android/ui/views/textswitcher/MainActivity.java
+++ b/ui/views/TextSwitcher/TextSwitcherSample/src/main/java/com/example/android/textswitcher/MainActivity.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.ui.views.textswitcher;
+package com.example.android.textswitcher;
 
 import android.app.Activity;
 import android.os.Bundle;
@@ -25,16 +25,13 @@
 import android.widget.Button;
 import android.widget.TextSwitcher;
 import android.widget.TextView;
-import android.widget.ViewSwitcher;
 import android.widget.ViewSwitcher.ViewFactory;
 
-import com.example.android.view.textswitcher.R;
-
 /**
- * This sample shows the use of the {@link TextSwitcher} View with animations. A
- * {@link TextSwitcher} is a special type of {@link ViewSwitcher} that animates
+ * This sample shows the use of the {@link android.widget.TextSwitcher} View with animations. A
+ * {@link android.widget.TextSwitcher} is a special type of {@link android.widget.ViewSwitcher} that animates
  * the current text out and new text in when
- * {@link TextSwitcher#setText(CharSequence)} is called.
+ * {@link android.widget.TextSwitcher#setText(CharSequence)} is called.
  */
 public class MainActivity extends Activity {
     private TextSwitcher mSwitcher;
@@ -43,7 +40,7 @@
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
 
         // Get the TextSwitcher view from the layout
         mSwitcher = (TextSwitcher) findViewById(R.id.switcher);
@@ -88,10 +85,10 @@
 
     // BEGIN_INCLUDE(factory)
     /**
-     * The {@link ViewFactory} used to create {@link TextView}s that the
-     * {@link TextSwitcher} will switch between.
+     * The {@link android.widget.ViewSwitcher.ViewFactory} used to create {@link android.widget.TextView}s that the
+     * {@link android.widget.TextSwitcher} will switch between.
      */
-    private ViewSwitcher.ViewFactory mFactory = new ViewFactory() {
+    private ViewFactory mFactory = new ViewFactory() {
 
         @Override
         public View makeView() {
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-hdpi/ic_launcher.png b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-mdpi/ic_launcher.png b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/layout/activity_main.xml b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/layout/activity_main.xml
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/layout/sample_main.xml
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values-sw600dp/dimens.xml b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-sw600dp/dimens.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/values-sw600dp/dimens.xml
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-sw600dp/dimens.xml
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values-sw720dp-land/dimens.xml b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/values-sw720dp-land/dimens.xml
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values-v11/styles.xml b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-v11/styles.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/values-v11/styles.xml
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-v11/styles.xml
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values-v14/styles.xml b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-v14/styles.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/values-v14/styles.xml
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values-v14/styles.xml
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/dimens.xml b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values/dimens.xml
similarity index 100%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/values/dimens.xml
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values/dimens.xml
diff --git a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/strings.xml b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values/strings.xml
similarity index 94%
rename from ui/views/TextSwitcher/TextSwitcher/src/main/res/values/strings.xml
rename to ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values/strings.xml
index 6b281e6..612b6cb 100644
--- a/ui/views/TextSwitcher/TextSwitcher/src/main/res/values/strings.xml
+++ b/ui/views/TextSwitcher/TextSwitcherSample/src/main/res/values/strings.xml
@@ -17,7 +17,6 @@
 
 <resources>
 
-    <string name="app_name">TextSwitcherSample</string>
     <string name="intro">This sample illustrates the use of a <b>TextSwitcher</b> to display text.
 \n\n<b>Click the button</b> below to set new text in the TextSwitcher and observe the in and out
  fade animations.</string>
diff --git a/ui/views/TextSwitcher/build.gradle b/ui/views/TextSwitcher/build.gradle
index 036abc8..ffb5c2f 100644
--- a/ui/views/TextSwitcher/build.gradle
+++ b/ui/views/TextSwitcher/build.gradle
@@ -1,8 +1,11 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
 }
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/views/TextSwitcher/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/views/TextSwitcher/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/views/TextSwitcher/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/views/TextSwitcher/gradle/wrapper/gradle-wrapper.properties b/ui/views/TextSwitcher/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/ui/views/TextSwitcher/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/views/TextSwitcher/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/views/TextSwitcher/settings.gradle b/ui/views/TextSwitcher/settings.gradle
index aefb871..6740a95 100644
--- a/ui/views/TextSwitcher/settings.gradle
+++ b/ui/views/TextSwitcher/settings.gradle
@@ -1 +1,4 @@
-include ':TextSwitcher'
+
+
+
+include 'TextSwitcherSample'
diff --git a/ui/views/TextSwitcher/template-params.xml b/ui/views/TextSwitcher/template-params.xml
new file mode 100644
index 0000000..dffc256
--- /dev/null
+++ b/ui/views/TextSwitcher/template-params.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+
+
+<sample>
+    <name>TextSwitcher</name>
+    <group>NoGroup</group>
+    <package>com.example.android.textswitcher</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>4</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+                This sample illustrates the use of a TextSwitcher to display text.
+                \n\nClick the button below to set new text in the TextSwitcher and observe the
+                in and out fade animations.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/.gitignore b/ui/window/ImmersiveMode/ImmersiveModeSample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/ui/window/ImmersiveMode/ImmersiveModeSample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/README-singleview.txt b/ui/window/ImmersiveMode/ImmersiveModeSample/README-singleview.txt
similarity index 100%
rename from ui/ImmersiveMode/ImmersiveModeSample/README-singleview.txt
rename to ui/window/ImmersiveMode/ImmersiveModeSample/README-singleview.txt
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/ui/window/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
similarity index 100%
rename from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
rename to ui/window/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/AndroidManifest.xml b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/AndroidManifest.xml
similarity index 100%
rename from ui/ImmersiveMode/ImmersiveModeSample/src/main/AndroidManifest.xml
rename to ui/window/ImmersiveMode/ImmersiveModeSample/src/main/AndroidManifest.xml
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/java/com/example/android/immersivemode/ImmersiveModeFragment.java b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/java/com/example/android/immersivemode/ImmersiveModeFragment.java
similarity index 88%
rename from ui/ImmersiveMode/ImmersiveModeSample/src/main/java/com/example/android/immersivemode/ImmersiveModeFragment.java
rename to ui/window/ImmersiveMode/ImmersiveModeSample/src/main/java/com/example/android/immersivemode/ImmersiveModeFragment.java
index d9c4fb8..8a7255c 100644
--- a/ui/ImmersiveMode/ImmersiveModeSample/src/main/java/com/example/android/immersivemode/ImmersiveModeFragment.java
+++ b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/java/com/example/android/immersivemode/ImmersiveModeFragment.java
@@ -68,7 +68,7 @@
         // END_INCLUDE (get_current_ui_flags)
         // BEGIN_INCLUDE (toggle_ui_flags)
         boolean isImmersiveModeEnabled =
-                ((uiOptions | View.SYSTEM_UI_FLAG_IMMERSIVE) == uiOptions);
+                ((uiOptions | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY) == uiOptions);
         if (isImmersiveModeEnabled) {
             Log.i(TAG, "Turning immersive mode mode off. ");
         } else {
@@ -89,8 +89,12 @@
         // Note that this flag doesn't do anything by itself, it only augments the behavior
         // of HIDE_NAVIGATION and FLAG_FULLSCREEN.  For the purposes of this sample
         // all three flags are being toggled together.
+        // Note that there are two immersive mode UI flags, one of which is referred to as "sticky".
+        // Sticky immersive mode differs in that it makes the navigation and status bars
+        // semi-transparent, and the UI flag does not get cleared when the user interacts with
+        // the screen.
         if (Build.VERSION.SDK_INT >= 18) {
-            newUiOptions ^= View.SYSTEM_UI_FLAG_IMMERSIVE;
+            newUiOptions ^= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
         }
 
         getActivity().getWindow().getDecorView().setSystemUiVisibility(newUiOptions);
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
rename to ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
rename to ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
rename to ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png b/ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from ui/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to ui/window/ImmersiveMode/ImmersiveModeSample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/tests/AndroidManifest.xml b/ui/window/ImmersiveMode/ImmersiveModeSample/tests/AndroidManifest.xml
similarity index 100%
rename from ui/ImmersiveMode/ImmersiveModeSample/tests/AndroidManifest.xml
rename to ui/window/ImmersiveMode/ImmersiveModeSample/tests/AndroidManifest.xml
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/ImmersiveModeSampleTests.java b/ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/ImmersiveModeSampleTests.java
similarity index 100%
rename from ui/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/ImmersiveModeSampleTests.java
rename to ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/ImmersiveModeSampleTests.java
diff --git a/ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/SampleTests.java b/ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/SampleTests.java
new file mode 100644
index 0000000..162b3bd
--- /dev/null
+++ b/ui/window/ImmersiveMode/ImmersiveModeSample/tests/src/com/example/android/immersivemode/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.immersivemode.tests;
+
+import com.example.android.immersivemode.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for ImmersiveMode sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private ImmersiveModeFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (ImmersiveModeFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/ui/window/ImmersiveMode/_index.jd b/ui/window/ImmersiveMode/_index.jd
new file mode 100644
index 0000000..7c9a272
--- /dev/null
+++ b/ui/window/ImmersiveMode/_index.jd
@@ -0,0 +1,14 @@
+
+
+
+page.tags="ImmersiveMode"
+sample.group=UI
+@jd:body
+
+<p>
+            
+            One of the features introduced in KitKat is "immersive mode". Immersive mode gives the
+            user the ability to show/hide the status bar and navigation bar with a swipe.  To try,
+            click the "Toggle immersive mode" button, then try swiping the bar in and out!
+            
+        </p>
diff --git a/ui/window/ImmersiveMode/build.gradle b/ui/window/ImmersiveMode/build.gradle
new file mode 100644
index 0000000..ffb5c2f
--- /dev/null
+++ b/ui/window/ImmersiveMode/build.gradle
@@ -0,0 +1,11 @@
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../../build"
+  pathToSamplesCommon "../../../common"
+}
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/ui/window/ImmersiveMode/buildSrc/build.gradle
similarity index 63%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to ui/window/ImmersiveMode/buildSrc/build.gradle
index 8c294c2..e344a8c 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/ui/window/ImmersiveMode/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
@@ -8,7 +11,7 @@
 sourceSets {
     main {
         groovy {
-            srcDir new File(rootDir, "../../../../../build/buildSrc/src/main/groovy")
+            srcDir new File(rootDir, "../../../../../../build/buildSrc/src/main/groovy")
         }
     }
 }
diff --git a/ui/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar b/ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
rename from ui/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar
rename to ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties b/ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.properties
similarity index 80%
copy from connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
copy to ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
+++ b/ui/window/ImmersiveMode/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/ImmersiveMode/gradlew b/ui/window/ImmersiveMode/gradlew
similarity index 100%
rename from ui/ImmersiveMode/gradlew
rename to ui/window/ImmersiveMode/gradlew
diff --git a/ui/ImmersiveMode/gradlew.bat b/ui/window/ImmersiveMode/gradlew.bat
similarity index 100%
rename from ui/ImmersiveMode/gradlew.bat
rename to ui/window/ImmersiveMode/gradlew.bat
diff --git a/ui/ImmersiveMode/settings.gradle b/ui/window/ImmersiveMode/settings.gradle
similarity index 90%
rename from ui/ImmersiveMode/settings.gradle
rename to ui/window/ImmersiveMode/settings.gradle
index 409c461..d13a7a1 100644
--- a/ui/ImmersiveMode/settings.gradle
+++ b/ui/window/ImmersiveMode/settings.gradle
@@ -1 +1,4 @@
+
+
+
 include 'ImmersiveModeSample'
diff --git a/ui/ImmersiveMode/template-params.xml b/ui/window/ImmersiveMode/template-params.xml
similarity index 95%
rename from ui/ImmersiveMode/template-params.xml
rename to ui/window/ImmersiveMode/template-params.xml
index 9ee55ae..88d3136 100644
--- a/ui/ImmersiveMode/template-params.xml
+++ b/ui/window/ImmersiveMode/template-params.xml
@@ -16,8 +16,9 @@
 -->
 <sample>
     <name>ImmersiveMode</name>
+    <group>UI</group>
     <package>com.example.android.immersivemode</package>
-    <compileSdkVersion>"android-KeyLimePie"</compileSdkVersion>
+    <compileSdkVersion>19</compileSdkVersion>
 
     <!--TODO: change minSdk if needed-->
     <minSdk>4</minSdk>
diff --git a/views/TextLinkify/AndroidManifest.xml b/views/TextLinkify/AndroidManifest.xml
deleted file mode 100644
index 0bf9b97..0000000
--- a/views/TextLinkify/AndroidManifest.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  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.views.textlinkify"
-    android:versionCode="1"
-    android:versionName="1.0" >
-
-    <uses-sdk
-        android:minSdkVersion="4"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name="com.example.android.views.textlinkify.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/views/TextLinkify/TextLinkify/build.gradle b/views/TextLinkify/TextLinkify/build.gradle
deleted file mode 100644
index ae56fea..0000000
--- a/views/TextLinkify/TextLinkify/build.gradle
+++ /dev/null
@@ -1,18 +0,0 @@
-buildscript {
-    repositories {
-        mavenCentral()
-    }
-    dependencies {
-        classpath 'com.android.tools.build:gradle:0.5.+'
-    }
-}
-apply plugin: 'android'
-
-dependencies {
-    compile "com.android.support:support-v4:18.0.+"
-}
-
-android {
-    compileSdkVersion 18
-    buildToolsVersion "18.0.1"
-}
diff --git a/views/TextLinkify/TextLinkify/src/main/AndroidManifest.xml b/views/TextLinkify/TextLinkify/src/main/AndroidManifest.xml
deleted file mode 100644
index 0bf9b97..0000000
--- a/views/TextLinkify/TextLinkify/src/main/AndroidManifest.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  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.views.textlinkify"
-    android:versionCode="1"
-    android:versionName="1.0" >
-
-    <uses-sdk
-        android:minSdkVersion="4"
-        android:targetSdkVersion="17" />
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name="com.example.android.views.textlinkify.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/views/TextLinkify/TextLinkify/src/main/res/values-v11/styles.xml b/views/TextLinkify/TextLinkify/src/main/res/values-v11/styles.xml
deleted file mode 100644
index 91f4523..0000000
--- a/views/TextLinkify/TextLinkify/src/main/res/values-v11/styles.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!--
-  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>
-
-    <!--
-        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">
-        <!-- API 11 theme customizations can go here. -->
-    </style>
-
-</resources>
diff --git a/views/TextLinkify/TextLinkify/src/main/res/values/styles.xml b/views/TextLinkify/TextLinkify/src/main/res/values/styles.xml
deleted file mode 100644
index 91da12c..0000000
--- a/views/TextLinkify/TextLinkify/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<!--
-  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 xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <!--
-        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="LinkText">
-        <item name="android:paddingTop">9dp</item>
-        <item name="android:paddingBottom">9dp</item>
-    </style>
-</resources>
diff --git a/views/TextLinkify/TextLinkifySample/.gitignore b/views/TextLinkify/TextLinkifySample/.gitignore
new file mode 100644
index 0000000..6eb878d
--- /dev/null
+++ b/views/TextLinkify/TextLinkifySample/.gitignore
@@ -0,0 +1,16 @@
+# 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.
+src/template/
+src/common/
+build.gradle
diff --git a/ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt b/views/TextLinkify/TextLinkifySample/proguard-project.txt
similarity index 100%
copy from ui/ImmersiveMode/ImmersiveModeSample/proguard-project.txt
copy to views/TextLinkify/TextLinkifySample/proguard-project.txt
diff --git a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml b/views/TextLinkify/TextLinkifySample/src/main/AndroidManifest.xml
similarity index 72%
copy from ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
copy to views/TextLinkify/TextLinkifySample/src/main/AndroidManifest.xml
index 3c0e66a..49b4eae 100644
--- a/ui/accessibility/BasicAccessibility/BasicAccessibility/src/main/AndroidManifest.xml
+++ b/views/TextLinkify/TextLinkifySample/src/main/AndroidManifest.xml
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <!--
- Copyright (C) 2013 The Android Open Source Project
+ 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
+     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,
@@ -15,14 +15,16 @@
  limitations under the License.
 -->
 
+
+
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="com.example.android.ui.accessibility.BasicAccessibility"
+    package="com.example.android.textlinkify"
     android:versionCode="1"
-    android:versionName="1.0" >
+    android:versionName="1.0">
 
     <uses-sdk
-        android:minSdkVersion="11"
-        android:targetSdkVersion="16" />
+        android:minSdkVersion="4"
+        android:targetSdkVersion="17" />
 
     <application
         android:allowBackup="true"
@@ -30,7 +32,7 @@
         android:label="@string/app_name"
         android:theme="@style/AppTheme" >
         <activity
-            android:name="com.example.android.ui.accessibility.BasicAccessibility.MainActivity"
+            android:name=".MainActivity"
             android:label="@string/app_name" >
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
diff --git a/views/TextLinkify/TextLinkify/src/main/java/com/example/android/views/textlinkify/MainActivity.java b/views/TextLinkify/TextLinkifySample/src/main/java/com/example/android/textlinkify/MainActivity.java
similarity index 96%
rename from views/TextLinkify/TextLinkify/src/main/java/com/example/android/views/textlinkify/MainActivity.java
rename to views/TextLinkify/TextLinkifySample/src/main/java/com/example/android/textlinkify/MainActivity.java
index 9e5a7c9..c9325a9 100644
--- a/views/TextLinkify/TextLinkify/src/main/java/com/example/android/views/textlinkify/MainActivity.java
+++ b/views/TextLinkify/TextLinkifySample/src/main/java/com/example/android/textlinkify/MainActivity.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.example.android.views.textlinkify;
+package com.example.android.textlinkify;
 
 import android.app.Activity;
 import android.graphics.Typeface;
@@ -29,7 +29,7 @@
 
 /**
  * This sample demonstrates how clickable links can be added to a
- * {@link TextView}.
+ * {@link android.widget.TextView}.
  *
  * <p>This can be done in three ways:
  * <ul>
@@ -38,7 +38,7 @@
  * {@link android.widget.TextView#setAutoLinkMask(int)} using an option from
  * {@link android.text.util.Linkify}</li>
  *
- * <li><b>Parsing a String as HTML:</b> See {@link Html#fromHtml(String)})</li>
+ * <li><b>Parsing a String as HTML:</b> See {@link android.text.Html#fromHtml(String)})</li>
  *
  * <li><b>Manually by constructing a {@link android.text.SpannableString}:</b> Consisting of
  * {@link android.text.style.StyleSpan} and {@link android.text.style.URLSpan} objects that
@@ -52,7 +52,7 @@
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
 
-        setContentView(R.layout.activity_main);
+        setContentView(R.layout.sample_main);
 
         // BEGIN_INCLUDE(text_auto_linkify)
         /*
diff --git a/views/TextLinkify/TextLinkify/src/main/res/drawable-hdpi/ic_launcher.png b/views/TextLinkify/TextLinkifySample/src/main/res/drawable-hdpi/ic_launcher.png
similarity index 100%
rename from views/TextLinkify/TextLinkify/src/main/res/drawable-hdpi/ic_launcher.png
rename to views/TextLinkify/TextLinkifySample/src/main/res/drawable-hdpi/ic_launcher.png
Binary files differ
diff --git a/views/TextLinkify/TextLinkify/src/main/res/drawable-mdpi/ic_launcher.png b/views/TextLinkify/TextLinkifySample/src/main/res/drawable-mdpi/ic_launcher.png
similarity index 100%
rename from views/TextLinkify/TextLinkify/src/main/res/drawable-mdpi/ic_launcher.png
rename to views/TextLinkify/TextLinkifySample/src/main/res/drawable-mdpi/ic_launcher.png
Binary files differ
diff --git a/views/TextLinkify/TextLinkify/src/main/res/drawable-xhdpi/ic_launcher.png b/views/TextLinkify/TextLinkifySample/src/main/res/drawable-xhdpi/ic_launcher.png
similarity index 100%
rename from views/TextLinkify/TextLinkify/src/main/res/drawable-xhdpi/ic_launcher.png
rename to views/TextLinkify/TextLinkifySample/src/main/res/drawable-xhdpi/ic_launcher.png
Binary files differ
diff --git a/views/TextLinkify/TextLinkify/src/main/res/drawable-xxhdpi/ic_launcher.png b/views/TextLinkify/TextLinkifySample/src/main/res/drawable-xxhdpi/ic_launcher.png
similarity index 100%
rename from views/TextLinkify/TextLinkify/src/main/res/drawable-xxhdpi/ic_launcher.png
rename to views/TextLinkify/TextLinkifySample/src/main/res/drawable-xxhdpi/ic_launcher.png
Binary files differ
diff --git a/views/TextLinkify/TextLinkify/src/main/res/layout/activity_main.xml b/views/TextLinkify/TextLinkifySample/src/main/res/layout/sample_main.xml
similarity index 100%
rename from views/TextLinkify/TextLinkify/src/main/res/layout/activity_main.xml
rename to views/TextLinkify/TextLinkifySample/src/main/res/layout/sample_main.xml
diff --git a/views/TextLinkify/TextLinkify/src/main/res/values-sw720dp-land/dimens.xml b/views/TextLinkify/TextLinkifySample/src/main/res/values-sw720dp-land/dimens.xml
similarity index 100%
rename from views/TextLinkify/TextLinkify/src/main/res/values-sw720dp-land/dimens.xml
rename to views/TextLinkify/TextLinkifySample/src/main/res/values-sw720dp-land/dimens.xml
diff --git a/views/TextLinkify/TextLinkify/src/main/res/values/dimens.xml b/views/TextLinkify/TextLinkifySample/src/main/res/values/dimens.xml
similarity index 100%
rename from views/TextLinkify/TextLinkify/src/main/res/values/dimens.xml
rename to views/TextLinkify/TextLinkifySample/src/main/res/values/dimens.xml
diff --git a/views/TextLinkify/TextLinkify/src/main/res/values/strings.xml b/views/TextLinkify/TextLinkifySample/src/main/res/values/strings.xml
similarity index 97%
rename from views/TextLinkify/TextLinkify/src/main/res/values/strings.xml
rename to views/TextLinkify/TextLinkifySample/src/main/res/values/strings.xml
index 371ee69..c50774e 100644
--- a/views/TextLinkify/TextLinkify/src/main/res/values/strings.xml
+++ b/views/TextLinkify/TextLinkifySample/src/main/res/values/strings.xml
@@ -17,7 +17,6 @@
 
 <resources>
 
-    <string name="app_name">TextLinkify Sample</string>
     <string name="intro">This sample illustrates how links can be added to a TextView.
     \nThis can be done either automatically by setting the <i>autoLink</i> property
     or explicitly.</string>
diff --git a/views/TextLinkify/TextLinkify/src/main/res/values-sw600dp/dimens.xml b/views/TextLinkify/TextLinkifySample/src/main/res/values/styles.xml
similarity index 73%
rename from views/TextLinkify/TextLinkify/src/main/res/values-sw600dp/dimens.xml
rename to views/TextLinkify/TextLinkifySample/src/main/res/values/styles.xml
index 686fe89..29c4230 100644
--- a/views/TextLinkify/TextLinkify/src/main/res/values-sw600dp/dimens.xml
+++ b/views/TextLinkify/TextLinkifySample/src/main/res/values/styles.xml
@@ -14,11 +14,9 @@
   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 xmlns:android="http://schemas.android.com/apk/res/android">
+    <style name="LinkText">
+        <item name="android:paddingTop">9dp</item>
+        <item name="android:paddingBottom">9dp</item>
+    </style>
 </resources>
diff --git a/views/TextLinkify/TextLinkifySample/tests/AndroidManifest.xml b/views/TextLinkify/TextLinkifySample/tests/AndroidManifest.xml
new file mode 100644
index 0000000..87b785f
--- /dev/null
+++ b/views/TextLinkify/TextLinkifySample/tests/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.
+  -->
+<!-- package name must be unique so suffix with "tests" so package loader doesn't ignore us -->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="${sample.package}.tests"
+          android:versionCode="1"
+          android:versionName="1.0">
+
+    <uses-sdk
+            android:minSdkVersion="18"
+            android:targetSdkVersion="19" />
+
+    <!-- We add an application tag here just so that we can indicate that
+         this package needs to link against the android.test library,
+         which is needed when building test cases. -->
+    <application>
+        <uses-library android:name="android.test.runner" />
+    </application>
+
+    <!--
+    Specifies the instrumentation test runner used to run the tests.
+    -->
+    <instrumentation
+            android:name="android.test.InstrumentationTestRunner"
+            android:targetPackage="${sample.package}"
+            android:label="Tests for ${sample.package}" />
+
+</manifest>
\ No newline at end of file
diff --git a/views/TextLinkify/TextLinkifySample/tests/src/com/example/android/textlinkify/tests/SampleTests.java b/views/TextLinkify/TextLinkifySample/tests/src/com/example/android/textlinkify/tests/SampleTests.java
new file mode 100644
index 0000000..90a91cc
--- /dev/null
+++ b/views/TextLinkify/TextLinkifySample/tests/src/com/example/android/textlinkify/tests/SampleTests.java
@@ -0,0 +1,79 @@
+/*
+* 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.
+*/
+
+
+
+/*
+* 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.textlinkify.tests;
+
+import com.example.android.textlinkify.*;
+
+import android.test.ActivityInstrumentationTestCase2;
+
+/**
+* Tests for TextLinkify sample.
+*/
+public class SampleTests extends ActivityInstrumentationTestCase2<MainActivity> {
+
+    private MainActivity mTestActivity;
+    private TextLinkifyFragment mTestFragment;
+
+    public SampleTests() {
+        super(MainActivity.class);
+    }
+
+    @Override
+    protected void setUp() throws Exception {
+        super.setUp();
+
+        // Starts the activity under test using the default Intent with:
+        // action = {@link Intent#ACTION_MAIN}
+        // flags = {@link Intent#FLAG_ACTIVITY_NEW_TASK}
+        // All other fields are null or empty.
+        mTestActivity = getActivity();
+        mTestFragment = (TextLinkifyFragment)
+            mTestActivity.getSupportFragmentManager().getFragments().get(1);
+    }
+
+    /**
+    * Test if the test fixture has been set up correctly.
+    */
+    public void testPreconditions() {
+        //Try to add a message to add context to your assertions. These messages will be shown if
+        //a tests fails and make it easy to understand why a test failed
+        assertNotNull("mTestActivity is null", mTestActivity);
+        assertNotNull("mTestFragment is null", mTestFragment);
+    }
+
+    /**
+    * Add more tests below.
+    */
+
+}
\ No newline at end of file
diff --git a/views/TextLinkify/_index.jd b/views/TextLinkify/_index.jd
new file mode 100644
index 0000000..987fb62
--- /dev/null
+++ b/views/TextLinkify/_index.jd
@@ -0,0 +1,13 @@
+
+
+
+page.tags="TextLinkify"
+sample.group=NoGroup
+@jd:body
+
+<p>
+            
+            This sample illustrates how links can be added to a TextView. This can be done either
+            automatically by setting the "autoLink" property or explicitly.
+            
+        </p>
diff --git a/views/TextLinkify/build.gradle b/views/TextLinkify/build.gradle
index 495c503..c886d80 100644
--- a/views/TextLinkify/build.gradle
+++ b/views/TextLinkify/build.gradle
@@ -1 +1,11 @@
-// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+
+
+
+// BEGIN_EXCLUDE
+apply from: "../../../../build/build.gradle"
+samplegen {
+  pathToBuild "../../../../build"
+  pathToSamplesCommon "../../common"
+}
+// END_EXCLUDE
diff --git a/ui/ImmersiveMode/buildSrc/build.gradle b/views/TextLinkify/buildSrc/build.gradle
similarity index 98%
copy from ui/ImmersiveMode/buildSrc/build.gradle
copy to views/TextLinkify/buildSrc/build.gradle
index 8c294c2..29282af 100644
--- a/ui/ImmersiveMode/buildSrc/build.gradle
+++ b/views/TextLinkify/buildSrc/build.gradle
@@ -1,3 +1,6 @@
+
+
+
 repositories {
     mavenCentral()
 }
diff --git a/ui/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar b/views/TextLinkify/gradle/wrapper/gradle-wrapper.jar
similarity index 100%
copy from ui/ImmersiveMode/gradle/wrapper/gradle-wrapper.jar
copy to views/TextLinkify/gradle/wrapper/gradle-wrapper.jar
Binary files differ
diff --git a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties b/views/TextLinkify/gradle/wrapper/gradle-wrapper.properties
similarity index 80%
copy from connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
copy to views/TextLinkify/gradle/wrapper/gradle-wrapper.properties
index 055ba6f..861eddc 100644
--- a/connectivity/network/BasicNetworkDemo/gradle/wrapper/gradle-wrapper.properties
+++ b/views/TextLinkify/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,6 @@
-#
-#Mon Jul 22 11:40:20 PDT 2013
+#Wed Apr 10 15:27:10 PDT 2013
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
+distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
diff --git a/ui/ImmersiveMode/gradlew b/views/TextLinkify/gradlew
similarity index 100%
copy from ui/ImmersiveMode/gradlew
copy to views/TextLinkify/gradlew
diff --git a/ui/ImmersiveMode/gradlew.bat b/views/TextLinkify/gradlew.bat
similarity index 100%
copy from ui/ImmersiveMode/gradlew.bat
copy to views/TextLinkify/gradlew.bat
diff --git a/views/TextLinkify/settings.gradle b/views/TextLinkify/settings.gradle
index 2042982..38e7ddd 100644
--- a/views/TextLinkify/settings.gradle
+++ b/views/TextLinkify/settings.gradle
@@ -1,2 +1,4 @@
-include ':TextLinkify'
 
+
+
+include 'TextLinkifySample'
diff --git a/views/TextLinkify/template-params.xml b/views/TextLinkify/template-params.xml
new file mode 100644
index 0000000..c703b8b
--- /dev/null
+++ b/views/TextLinkify/template-params.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+
+<sample>
+    <name>TextLinkify</name>
+    <group>Views</group>
+    <package>com.example.android.textlinkify</package>
+
+    <!-- change minSdk if needed-->
+    <minSdk>4</minSdk>
+
+    <strings>
+        <intro>
+            <![CDATA[
+            This sample illustrates how links can be added to a TextView. This can be done either
+            automatically by setting the "autoLink" property or explicitly.
+            ]]>
+        </intro>
+    </strings>
+
+    <template src="base"/>
+    <common src="logger"/>
+
+</sample>
diff --git a/views/TextLinkify/textLinkify.jd b/views/TextLinkify/textLinkify.jd
deleted file mode 100644
index ca39b7b..0000000
--- a/views/TextLinkify/textLinkify.jd
+++ /dev/null
@@ -1,15 +0,0 @@
-page.title=Linkify Sample
-@jd:body
-<p>This sample demonstrates how clickable links can be added to a
- <a href="http://developer.android.com/reference/android/widget/TextView.html">TextView</a>.
-  This can be done automatically (see
- <a href="http://developer.android.com/reference/android/widget/TextView.html#setAutoLinkMask(int)">
-TextView#setAutoLinkMask(int)</a>), explicitly by parsing a String as
- HTML (see
- <a href="http://developer.android.com/reference/android/text/Html.html#fromHtml(java.lang.String)">
- Html#fromHtml(String)</a>) or using a
-  <a href="http://developer.android.com/reference/android/text/SpannableString.html">SpannableString
-</a> consisting of
- <a href="http://developer.android.com/reference/android/text/style/StyleSpan.html">StyleSpan</a>
-  and <a href="http://developer.android.com/reference/android/text/style/URLSpan.html">URLSpan</a>
- objects. </p>
\ No newline at end of file