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

Commit ba6b47fd authored by Samuel Fufa's avatar Samuel Fufa
Browse files

Add visual indicator for predicted hotseat icons

Bug: 142753423
Test: Manual
Change-Id: Ie4325660fc5392358ec845ae58385bef279db60f
parent 5bdae3d8
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<inset xmlns:android="http://schemas.android.com/apk/res/android"
    android:inset="@dimen/predicted_icon_background_inset">
    <shape>
        <solid android:color="?attr/folderFillColor" />
        <corners android:radius="@dimen/predicted_icon_background_corner_radius" />
    </shape>
</inset>
+5 −0
Original line number Diff line number Diff line
@@ -28,4 +28,9 @@
    <dimen name="swipe_up_fling_min_visible_change">18dp</dimen>
    <dimen name="swipe_up_y_overshoot">10dp</dimen>
    <dimen name="swipe_up_max_workspace_trans_y">-60dp</dimen>

    <!-- Predicted icon related -->
    <dimen name="predicted_icon_background_corner_radius">15dp</dimen>
    <dimen name="predicted_icon_background_inset">8dp</dimen>

</resources>
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
@@ -139,6 +139,7 @@ public class HotseatPredictionController implements DragController.DragListener,
                PopupContainerWithArrow.showForIcon((BubbleTextView) v);
                return true;
            });
            icon.setBackgroundResource(R.drawable.predicted_icon_background);
        }
    }

@@ -205,6 +206,7 @@ public class HotseatPredictionController implements DragController.DragListener,
                LauncherSettings.Favorites.CONTAINER_HOTSEAT, workspaceItemInfo.screenId,
                workspaceItemInfo.cellX, workspaceItemInfo.cellY);
        ObjectAnimator.ofFloat(icon, SCALE_PROPERTY, 1, 0.8f, 1).start();
        icon.reset();
        icon.applyFromWorkspaceItem(workspaceItemInfo);
        icon.setOnLongClickListener(ItemLongClickListener.INSTANCE_WORKSPACE);
    }
+1 −0
Original line number Diff line number Diff line
@@ -216,6 +216,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
        cancelDotScaleAnim();
        mDotParams.scale = 0f;
        mForceHideDot = false;
        setBackground(null);
    }

    private void cancelDotScaleAnim() {