Merge "Don't layout empty tasks in layout anim if we have the actual content." into ub-launcher3-qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
db4e713c18
@@ -161,6 +161,13 @@ public final class ContentFillItemAnimator extends SimpleItemAnimator {
|
||||
|
||||
private void animateChangeImpl(ViewHolder viewHolder, long startDelay) {
|
||||
TaskItemView itemView = (TaskItemView) viewHolder.itemView;
|
||||
if (itemView.getAlpha() == 0) {
|
||||
// View is still not visible, so we can finish the change immediately.
|
||||
CONTENT_TRANSITION_PROGRESS.set(itemView, 1.0f);
|
||||
dispatchChangeFinished(viewHolder, true /* oldItem */);
|
||||
dispatchFinishedWhenDone();
|
||||
return;
|
||||
}
|
||||
final ObjectAnimator anim =
|
||||
ObjectAnimator.ofFloat(itemView, CONTENT_TRANSITION_PROGRESS, 0.0f, 1.0f);
|
||||
anim.setDuration(ITEM_CHANGE_DURATION).setStartDelay(startDelay);
|
||||
|
||||
Reference in New Issue
Block a user