Merge "Fade folder icon text when opening/closing." into ub-launcher3-dorval-polish
am: 60c26d1424
Change-Id: I674031fc82d7eaae314affe9bfdaa2bf0764fa16
This commit is contained in:
@@ -60,7 +60,6 @@ import com.android.launcher3.LauncherSettings;
|
||||
import com.android.launcher3.LogDecelerateInterpolator;
|
||||
import com.android.launcher3.OnAlarmListener;
|
||||
import com.android.launcher3.PagedView;
|
||||
import com.android.launcher3.PendingAddItemInfo;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.ShortcutInfo;
|
||||
import com.android.launcher3.UninstallDropTarget.DropTargetSource;
|
||||
@@ -637,7 +636,9 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC
|
||||
@Override
|
||||
public void onAnimationStart(Animator animation) {
|
||||
if (FeatureFlags.LAUNCHER3_NEW_FOLDER_ANIMATION) {
|
||||
mFolderIcon.setBackgroundVisible(false);
|
||||
mFolderIcon.drawLeaveBehindIfExists();
|
||||
} else {
|
||||
mFolderIcon.setVisibility(INVISIBLE);
|
||||
}
|
||||
|
||||
@@ -790,6 +791,7 @@ public class Folder extends AbstractFloatingView implements DragSource, View.OnC
|
||||
mDragController.removeDropTarget(this);
|
||||
clearFocus();
|
||||
if (mFolderIcon != null) {
|
||||
mFolderIcon.setBackgroundVisible(true);
|
||||
mFolderIcon.setVisibility(View.VISIBLE);
|
||||
if (wasAnimated) {
|
||||
mFolderIcon.mBackground.animateBackgroundStroke();
|
||||
|
||||
@@ -208,6 +208,7 @@ public class FolderAnimationManager {
|
||||
play(a, getAnimator(mFolder, SCALE_PROPERTY, initialScale, finalScale));
|
||||
play(a, getAnimator(items, ITEMS_TEXT_COLOR_PROPERTY, Color.TRANSPARENT, finalTextColor));
|
||||
play(a, getAnimator(mFolderBackground, "color", initialColor, finalColor));
|
||||
play(a, mFolderIcon.mFolderName.createTextAlphaAnimator(!mIsOpening));
|
||||
play(a, new RoundedRectRevealOutlineProvider(initialRadius, finalRadius, startRect,
|
||||
endRect).createRevealAnimator(mFolder, !mIsOpening));
|
||||
|
||||
|
||||
@@ -120,6 +120,7 @@ public class FolderIcon extends FrameLayout implements FolderListener {
|
||||
private int mPrevTopPadding = -1;
|
||||
|
||||
PreviewBackground mBackground = new PreviewBackground();
|
||||
private boolean mBackgroundIsVisible = true;
|
||||
|
||||
private PreviewLayoutRule mPreviewLayoutRule;
|
||||
|
||||
@@ -883,10 +884,17 @@ public class FolderIcon extends FrameLayout implements FolderListener {
|
||||
mBackground.setInvalidateDelegate(this);
|
||||
}
|
||||
|
||||
public void setBackgroundVisible(boolean visible) {
|
||||
mBackgroundIsVisible = visible;
|
||||
invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void dispatchDraw(Canvas canvas) {
|
||||
super.dispatchDraw(canvas);
|
||||
|
||||
if (!mBackgroundIsVisible) return;
|
||||
|
||||
if (mReferenceDrawable != null) {
|
||||
computePreviewDrawingParams(mReferenceDrawable);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user