Animate inline QSB between home and apps

- Added a QSB to taskbar to be animated between inline QSB and taskbar
- Passed endValue of taskbar animator to TaskbarController to have aniamtion variation between home -> app and app -> home
- Tuned duartion of taskbar animation and also stagger animation when taskbar is present
- Disabled scaling down of taskbar and inline QSB for home -> app
- Disabled stagger animation of taskbar and inline QSB for app -> home

Bug: 220733187
Test: manual
Change-Id: I4aac0bbc343b992a0472298595770e2bf2a55990
This commit is contained in:
Alex Chau
2022-06-09 15:09:26 +01:00
parent b751033f30
commit c1d26448c5
10 changed files with 229 additions and 53 deletions

View File

@@ -15,6 +15,8 @@
*/
package com.android.launcher3.util;
import android.util.FloatProperty;
/**
* Allows the implementing view to add insets to the left and right.
*/
@@ -32,4 +34,22 @@ public interface HorizontalInsettableView {
*/
void setHorizontalInsets(float insetPercentage);
/**
* Returns the width percentage to inset the content from the left and from the right. See
* {@link #setHorizontalInsets};
*/
float getHorizontalInsets();
FloatProperty<HorizontalInsettableView> HORIZONTAL_INSETS =
new FloatProperty<HorizontalInsettableView>("horizontalInsets") {
@Override
public Float get(HorizontalInsettableView view) {
return view.getHorizontalInsets();
}
@Override
public void setValue(HorizontalInsettableView view, float insetPercentage) {
view.setHorizontalInsets(insetPercentage);
}
};
}