Add visual indicator for predicted hotseat icons
Bug: 142753423 Test: Manual Change-Id: Ie4325660fc5392358ec845ae58385bef279db60f
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
<?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>
|
||||
@@ -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>
|
||||
+2
@@ -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);
|
||||
}
|
||||
|
||||
@@ -216,6 +216,7 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver,
|
||||
cancelDotScaleAnim();
|
||||
mDotParams.scale = 0f;
|
||||
mForceHideDot = false;
|
||||
setBackground(null);
|
||||
}
|
||||
|
||||
private void cancelDotScaleAnim() {
|
||||
|
||||
Reference in New Issue
Block a user