Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f549dab3 authored by Tony Wickham's avatar Tony Wickham
Browse files

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
parent 192ae6ca
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -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"
+4 −5
Original line number Diff line number Diff line
@@ -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"
+2 −2
Original line number Diff line number Diff line
@@ -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>
+2 −2
Original line number Diff line number Diff line
@@ -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>
+1 −1
Original line number Diff line number Diff line
@@ -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>

Loading