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

Commit ae7e0344 authored by Ats Jenk's avatar Ats Jenk
Browse files

Add support for showing border for desktop tile

When a external keyboard is connected and ENABLE_KEYBOARD_QUICK_SWITCH
feature flag is enabled, we highlight the selected tile in overview.
Add support to the new desktop tile to show the highlight.

Bug: 269342116
Test: connect an external keyboard, use alt+tab to open overview and
  switch between the tiles
Change-Id: I29ac5864776a9a251ecdb0cb4b741b12747de564
parent 673e6437
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -17,12 +17,15 @@

<com.android.quickstep.views.DesktopTaskView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
    xmlns:launcher="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="true"
    android:clipToOutline="true"
    android:defaultFocusHighlightEnabled="false"
    android:focusable="true">
    android:focusable="true"
    launcher:borderColor="?androidprv:attr/colorAccentSecondaryVariant">

    <View
        android:id="@+id/background"
+6 −0
Original line number Diff line number Diff line
@@ -132,6 +132,12 @@ public class DesktopTaskView extends TaskView {
        mIconView.setDrawable(new LayerDrawable(new Drawable[]{iconBackground, icon}));
    }

    @Override
    protected void updateBorderBounds(Rect bounds) {
        bounds.set(mBackgroundView.getLeft(), mBackgroundView.getTop(), mBackgroundView.getRight(),
                mBackgroundView.getBottom());
    }

    @Override
    public void bind(Task task, RecentsOrientedState orientedState) {
        bind(Collections.singletonList(task), orientedState);