Animate SplitPlaceholderView when entering split from overview

Bugs tracked in b/181704764

Bug: 181704764
Test: Tested on phone and large screen in multiple orientations

Change-Id: I07509006ae3d1f4425dc5119d0c8ed52b41a3bc2
This commit is contained in:
Vinit Nayak
2021-07-22 20:12:26 +00:00
parent b971baefe1
commit 7903758d08
19 changed files with 542 additions and 97 deletions
+15
View File
@@ -380,6 +380,21 @@ public final class Utilities {
return scale;
}
/**
* Similar to {@link #scaleRectAboutCenter(Rect, float)} except this allows different scales
* for X and Y
*/
public static void scaleRectFAboutCenter(RectF r, float scaleX, float scaleY) {
float px = r.centerX();
float py = r.centerY();
r.offset(-px, -py);
r.left = r.left * scaleX;
r.top = r.top * scaleY;
r.right = r.right * scaleX;
r.bottom = r.bottom * scaleY;
r.offset(px, py);
}
/**
* Maps t from one range to another range.
* @param t The value to map.