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

Commit 7da60438 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias Committed by Android (Google) Code Review
Browse files

Merge "Update the BorderAnimator" into udc-dev

parents 1f587dec 5e689146
Loading
Loading
Loading
Loading
+28 −16
Original line number Diff line number Diff line
@@ -25,6 +25,16 @@
    android:clipToOutline="true"
    launcher:borderColor="?androidprv:attr/materialColorOutline">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"

        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <include
            layout="@layout/keyboard_quick_switch_thumbnail"
            android:id="@+id/thumbnail1"
@@ -49,4 +59,6 @@
            app:layout_constraintStart_toEndOf="@id/thumbnail1"
            app:layout_constraintEnd_toEndOf="parent"/>

    </androidx.constraintlayout.widget.ConstraintLayout>

</com.android.launcher3.taskbar.KeyboardQuickSwitchTaskView>
+33 −21
Original line number Diff line number Diff line
@@ -20,11 +20,21 @@
    xmlns:launcher="http://schemas.android.com/apk/res-auto"
    android:layout_width="@dimen/keyboard_quick_switch_taskview_width"
    android:layout_height="@dimen/keyboard_quick_switch_taskview_height"
    android:background="@drawable/keyboard_quick_switch_overview_button_background"
    android:clipToOutline="true"
    android:importantForAccessibility="yes"
    launcher:borderColor="?androidprv:attr/materialColorOutline">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/keyboard_quick_switch_overview_button_background"

        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <ImageView
            android:id="@+id/icon"
            android:layout_width="@dimen/keyboard_quick_switch_recents_icon_size"
@@ -51,4 +61,6 @@
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"/>

    </androidx.constraintlayout.widget.ConstraintLayout>

</com.android.launcher3.taskbar.KeyboardQuickSwitchTaskView>
+12 −0
Original line number Diff line number Diff line
@@ -25,6 +25,16 @@
    android:clipToOutline="true"
    launcher:borderColor="?androidprv:attr/materialColorOutline">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"

        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <include
            layout="@layout/keyboard_quick_switch_thumbnail"
            android:id="@+id/thumbnail1"
@@ -49,4 +59,6 @@
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintEnd_toEndOf="parent"/>

    </androidx.constraintlayout.widget.ConstraintLayout>

</com.android.launcher3.taskbar.KeyboardQuickSwitchTaskView>
+3 −2
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:paddingVertical="@dimen/keyboard_quick_switch_view_spacing"
    android:layout_marginTop="@dimen/keyboard_quick_switch_margin_top"
    android:layout_marginHorizontal="@dimen/keyboard_quick_switch_margin_ends"
    android:background="@drawable/keyboard_quick_switch_view_background"
@@ -44,7 +43,9 @@
        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/content"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"/>
            android:layout_height="wrap_content"
            android:paddingVertical="@dimen/keyboard_quick_switch_view_spacing"
            android:clipToPadding="false"/>

    </HorizontalScrollView>

+17 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.View;
import android.widget.ImageView;

import androidx.annotation.NonNull;
@@ -45,6 +46,7 @@ public class KeyboardQuickSwitchTaskView extends ConstraintLayout {

    @Nullable private ImageView mThumbnailView1;
    @Nullable private ImageView mThumbnailView2;
    @Nullable private View mContent;

    public KeyboardQuickSwitchTaskView(@NonNull Context context) {
        this(context, null);
@@ -84,7 +86,20 @@ public class KeyboardQuickSwitchTaskView extends ConstraintLayout {
                                .getColor(
                                        R.styleable.TaskView_borderColor,
                                        DEFAULT_BORDER_COLOR),
                /* invalidateViewCallback= */ KeyboardQuickSwitchTaskView.this::invalidate);
                /* invalidateViewCallback= */ KeyboardQuickSwitchTaskView.this::invalidate,
                /* viewScaleTargetProvider= */ new BorderAnimator.ViewScaleTargetProvider() {
                    @NonNull
                    @Override
                    public View getContainerView() {
                        return KeyboardQuickSwitchTaskView.this;
                    }

                    @NonNull
                    @Override
                    public View getContentView() {
                        return mContent;
                    }
                });
    }

    @Override
@@ -93,6 +108,7 @@ public class KeyboardQuickSwitchTaskView extends ConstraintLayout {

        mThumbnailView1 = findViewById(R.id.thumbnail1);
        mThumbnailView2 = findViewById(R.id.thumbnail2);
        mContent = findViewById(R.id.content);
    }

    @NonNull
Loading