List of usage examples for android.animation ObjectAnimator start
@Override public void start()
From source file:xyz.klinker.blur.launcher3.Launcher.java
private void shrinkAndFadeInFolderIcon(final FolderIcon fi, boolean animate) { if (fi == null) return;/*w w w.j a va 2 s . co m*/ PropertyValuesHolder alpha = PropertyValuesHolder.ofFloat("alpha", 1.0f); PropertyValuesHolder scaleX = PropertyValuesHolder.ofFloat("scaleX", 1.0f); PropertyValuesHolder scaleY = PropertyValuesHolder.ofFloat("scaleY", 1.0f); final CellLayout cl = (CellLayout) fi.getParent().getParent(); // We remove and re-draw the FolderIcon in-case it has changed mDragLayer.removeView(mFolderIconImageView); copyFolderIconToImage(fi); ObjectAnimator oa = LauncherAnimUtils.ofPropertyValuesHolder(mFolderIconImageView, alpha, scaleX, scaleY); oa.setDuration(getResources().getInteger(R.integer.config_folderExpandDuration)); oa.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { if (cl != null) { cl.clearFolderLeaveBehind(); // Remove the ImageView copy of the FolderIcon and make the original visible. mDragLayer.removeView(mFolderIconImageView); fi.setVisibility(View.VISIBLE); } } }); oa.start(); if (!animate) { oa.end(); } }