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

Commit a5ead459 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Simplifying some page indicator dots attributes so that it can

be easily modularized

> Moving the color configuration to xml
> Moving auto-hide logic to a subclass as it doesn't
  need to be in the main library

Bug: 274011949
Test: Verified on device
Change-Id: Icf7bd5d1cbde3daa9441f2af51f98a931bcd6ee2
parent e74c24d6
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
            style="@style/TaskbarEdu.Button.Close"
            android:textColor="?android:attr/textColorPrimary"/>

        <com.android.launcher3.pageindicators.PageIndicatorDots
        <com.android.launcher3.pageindicators.LauncherDotsPageIndicator
            android:id="@+id/content_page_indicator"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
@@ -63,6 +63,7 @@
            app:layout_constraintBottom_toBottomOf="@id/edu_start_button"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:indicatorDotColor="@color/folder_pagination_color"
            android:elevation="1dp" />

        <Button
+2 −2
Original line number Diff line number Diff line
@@ -25,12 +25,12 @@ import android.util.AttributeSet;
import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.PagedView;
import com.android.launcher3.R;
import com.android.launcher3.pageindicators.PageIndicatorDots;
import com.android.launcher3.pageindicators.LauncherDotsPageIndicator;
import com.android.launcher3.taskbar.TaskbarEduController.TaskbarEduCallbacks;
import com.android.launcher3.views.ActivityContext;

/** Horizontal carousel of tutorial screens for Taskbar Edu. */
public class TaskbarEduPagedView extends PagedView<PageIndicatorDots> {
public class TaskbarEduPagedView extends PagedView<LauncherDotsPageIndicator> {

    private TaskbarEduView mTaskbarEduView;
    private TaskbarEduCallbacks mControllerCallbacks;

res/drawable/page_indicator.xml

deleted100644 → 0
+0 −6
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="?attr/folderPaginationColor"/>
    <size android:width="@dimen/page_indicator_size" android:height="@dimen/page_indicator_size"/>
</shape>
 No newline at end of file
+6 −2
Original line number Diff line number Diff line
@@ -14,9 +14,13 @@
     limitations under the License.
-->

<com.android.launcher3.pageindicators.PageIndicatorDots xmlns:android="http://schemas.android.com/apk/res/android"
<com.android.launcher3.pageindicators.LauncherDotsPageIndicator
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:launcher="http://schemas.android.com/apk/res-auto"
    android:id="@+id/page_indicator"
    android:layout_width="match_parent"
    android:layout_height="@dimen/workspace_page_indicator_height"
    android:layout_gravity="bottom | center_horizontal"
    android:theme="@style/HomeScreenElementTheme" />
 No newline at end of file
    android:theme="@style/HomeScreenElementTheme"
    launcher:indicatorDotColor="?attr/workspaceTextColor"
    />
 No newline at end of file
+2 −1
Original line number Diff line number Diff line
@@ -53,12 +53,13 @@
            android:textColorHighlight="?android:attr/colorControlHighlight"
            android:textColorHint="?attr/folderHintColor"/>

        <com.android.launcher3.pageindicators.PageIndicatorDots
        <com.android.launcher3.pageindicators.LauncherDotsPageIndicator
            android:id="@+id/folder_page_indicator"
            android:layout_gravity="center_vertical"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:elevation="1dp"
            launcher:indicatorDotColor="@color/folder_pagination_color"
            />

    </LinearLayout>
Loading