Bound recents content alpha to 0 and 1

Now that we use OvershootInterpolator for the atomic recents animation,
it's possible to get alpha > 1. The drawable and text paint used in the
empty recents state doesn't handle this well, causing alpha to jump to 0
in this case. Instead, we'll just force it to clamp to 1 ourselves.

Bug: 80004542
Change-Id: Id0177caf63cd349f6f27c9dfaf0e8995447e70fc
This commit is contained in:
Tony Wickham 2018-05-21 17:04:46 -07:00
parent 52cb0a73a4
commit 8417a7b514
1 changed files with 1 additions and 0 deletions

View File

@ -1001,6 +1001,7 @@ public abstract class RecentsView<T extends BaseActivity> extends PagedView impl
}
public void setContentAlpha(float alpha) {
alpha = Utilities.boundToRange(alpha, 0, 1);
mContentAlpha = alpha;
for (int i = getChildCount() - 1; i >= 0; i--) {
TaskView child = getPageAt(i);