Folder icon polish.

- Increase the overlap between the preview items and the background
  so that it appears more intentional (lots of reports of users
  thinking that its a bug)
- Fix bug where clip path was still clipping icons when
  dragging and swiping to home.

Bug: 193701705
Bug: 191225536
Test: test 2 icon, 3 icon, and 4 icon folders
      close folder on 2nd page, ensure clipping
      ensure no preview items are clipped in drag view
      ensure no preview items are clipped in swipe up to home
      test 2x2, 3x3, 4x4, 4x5, and 5x5 grids to ensure no clipping
      of folder icons
      drag and drop folder in and out of hotseat
      create folders (2 icon, 3 icon, 4 icon)

Change-Id: Id49bae33438e10248bef05450d7e2c92c2140748
This commit is contained in:
Jon Miranda
2021-07-20 13:57:16 -07:00
committed by Jonathan Miranda
parent 75966cb1f7
commit 2cc564c647
6 changed files with 39 additions and 14 deletions

View File

@@ -7,7 +7,9 @@ public class ClippedFolderIconLayoutRule {
private static final float MIN_SCALE = 0.44f;
private static final float MAX_SCALE = 0.51f;
private static final float MAX_RADIUS_DILATION = 0.1f;
private static final float MAX_RADIUS_DILATION = 0.25f;
// The max amount of overlap the preview items can go outside of the background bounds.
public static final float ICON_OVERLAP_FACTOR = 1 + (MAX_RADIUS_DILATION / 2f);
private static final float ITEM_RADIUS_SCALE_FACTOR = 1.15f;
public static final int EXIT_INDEX = -2;