Add PageIndicator interface and custom PageIndicatorLine view.

- The current PageIndicator has been renamed to PageIndicatorDots
  and PageIndicatorMarker has been renamed to PageIndicatorDot.
- PageIndicatorDots and PageIndicatorLine implement PageIndicator.
- PageIndicatorLine uses scroll progress and number of pages to
  draw a line of the correct size and position.
- All of these page indicator files are now in a pageindicators package.

Bug: 27227498

Change-Id: I9230d2e0600ce583989bd31d0b0e252b148d15c2
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index f711274..4576e4d 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -57,12 +57,10 @@
 
         <!-- Keep these behind the workspace so that they are not visible when
              we go into AllApps -->
-        <include
+        <com.android.launcher3.pageindicators.PageIndicatorLine
             android:id="@+id/page_indicator"
-            layout="@layout/page_indicator"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_horizontal" />
+            android:layout_width="match_parent"
+            android:layout_height="1dp" />
 
         <include
             android:id="@+id/app_info_drop_target_bar"
diff --git a/res/layout-sw720dp/launcher.xml b/res/layout-sw720dp/launcher.xml
index 780d645..0f755d8 100644
--- a/res/layout-sw720dp/launcher.xml
+++ b/res/layout-sw720dp/launcher.xml
@@ -64,11 +64,10 @@
 
         <!-- Keep these behind the workspace so that they are not visible when
              we go into AllApps -->
-        <include android:id="@+id/page_indicator"
-            layout="@layout/page_indicator"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_gravity="center_horizontal" />
+        <com.android.launcher3.pageindicators.PageIndicatorLine
+            android:id="@+id/page_indicator"
+            android:layout_width="match_parent"
+            android:layout_height="1dp" />
 
         <include layout="@layout/widgets_view"
             android:id="@+id/widgets_view"
diff --git a/res/layout/page_indicator.xml b/res/layout/page_indicator.xml
index 68fe3dd..5655159 100644
--- a/res/layout/page_indicator.xml
+++ b/res/layout/page_indicator.xml
@@ -13,9 +13,9 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<com.android.launcher3.PageIndicator
+<com.android.launcher3.pageindicators.PageIndicatorDots
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:launcher="http://schemas.android.com/apk/res-auto"
     android:animateLayoutChanges="true"
     launcher:windowSize="@integer/config_maxNumberOfPageIndicatorsToShow">
-</com.android.launcher3.PageIndicator>
+</com.android.launcher3.pageindicators.PageIndicatorDots>
diff --git a/res/layout/page_indicator_marker.xml b/res/layout/page_indicator_marker.xml
index 564a958..357a761 100644
--- a/res/layout/page_indicator_marker.xml
+++ b/res/layout/page_indicator_marker.xml
@@ -13,7 +13,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<com.android.launcher3.PageIndicatorMarker
+<com.android.launcher3.pageindicators.PageIndicatorDot
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:launcher="http://schemas.android.com/apk/res-auto"
     android:layout_width="12dp"
@@ -36,4 +36,4 @@
         android:scaleX="0.5"
         android:scaleY="0.5"
         />
-</com.android.launcher3.PageIndicatorMarker>
+</com.android.launcher3.pageindicators.PageIndicatorDot>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index 6d8efaa..2eb9b91 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -32,7 +32,7 @@
     </declare-styleable>
 
     <!-- Page Indicator specific attributes. -->
-    <declare-styleable name="PageIndicator">
+    <declare-styleable name="PageIndicatorDots">
         <attr name="windowSize" format="integer"  />
     </declare-styleable>