LawnchairLauncher / lawnchair

No clever tagline needed.
https://lawnchair.app
Other
9.43k stars 1.23k forks source link

[BUG] Preview app icons on right side inside folder are being cut in right top and right bottom corners during close animation #4673

Open BlueGradientHorizon opened 2 months ago

BlueGradientHorizon commented 2 months ago

Describe the bug

The title is pretty self-explanatory. See screenshots section for a demonstration GIF. Happens always, no matter whether Lawnchair is set as the default launcher or changed via QuickSwitch.

Steps to reproduce

Steps to reproduce the behavior:

  1. Create folder with at least 4 items.
  2. Open folder.
  3. Close folder and watch animation precisely.

Expected behavior

To animation be correct and precise. Icons' shapes should not be cut in any way.

Screenshots

Demonstration: 944 Animation duration was set to 1.5x in developer settings. GIF speed is 0.25x.

Device information

Device 1

Device 2

App version for both devices: latest commit 30f5fef at the time of report writing (CI build #1240)

Additional context

Not required.

BlueGradientHorizon commented 2 months ago

I was playing with code and found out that if I comment out "reveal animator for the folder content" code block, the corners are no longer being cut. Just a hint, as I don't know launcher's codebase and why this animator is inteded (how actually it should work). https://github.com/LawnchairLauncher/lawnchair/blob/498e6a79efbbf9ca80bac1c0620772b29f0aedcf/src/com/android/launcher3/folder/FolderAnimationManager.java#L246-L255

MrSluffy commented 2 months ago

I haven't notice this one, nice catch, Thanks will look into this

BlueGradientHorizon commented 2 months ago

I noticed that if code block I mentioned earlier is commented out, you will face such behaviour:

https://github.com/user-attachments/assets/d473043b-fb83-4c25-a319-e030aa1686a3

Looks like this code hides all items which are not in 2x2 icons preview during animation. Solution looks somewhat hacky to me, but maybe the animation just needs more precision.