Migrate HorizontalPaging sample to new build system

Converting HorizontalPaging to use new templatized build system for
conformity with other samples.

Change-Id: Id714e6d9e6334282cf981318af1de273b4dbd649
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/views/HorizontalPaging/HorizontalPagingSample/proguard-project.txt b/ui/views/HorizontalPaging/HorizontalPagingSample/proguard-project.txt
new file mode 100644
index 0000000..0d8f171
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPagingSample/proguard-project.txt
@@ -0,0 +1,20 @@
+ 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/views/HorizontalPaging/HorizontalPagingSample/src/main/AndroidManifest.xml b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..33b9e15
--- /dev/null
+++ b/ui/views/HorizontalPaging/HorizontalPagingSample/src/main/AndroidManifest.xml
@@ -0,0 +1,46 @@
+<?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.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/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/views/HorizontalPaging/buildSrc/build.gradle b/ui/views/HorizontalPaging/buildSrc/build.gradle
new file mode 100644
index 0000000..e344a8c
--- /dev/null
+++ b/ui/views/HorizontalPaging/buildSrc/build.gradle
@@ -0,0 +1,18 @@
+
+
+
+repositories {
+    mavenCentral()
+}
+dependencies {
+    compile 'org.freemarker:freemarker:2.3.20'
+}
+
+sourceSets {
+    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>