private void startAnimate() { animateSolid.setVisibility(View.VISIBLE); AnimUtils.fade(animateSolid, 0, 1, 0, null); animateStroke.setVisibility(View.VISIBLE); animating = true; AnimUtils.scale( animateSolid, 1, scale, 1000, new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); animateViewBorder(); } }); AnimUtils.scale( startRec, 1, 0.85f, 350, new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); tvSave.setVisibility(View.VISIBLE); AnimUtils.fade(tvSave, 0, 1, 350, null); AnimUtils.translateY(tvSave, 0, -20, 350, null); AnimUtils.translateY(startRec, 0, -20, 350, null); } }); AnimUtils.scale(animateStroke, 1, 0.92f, 350, null); AnimUtils.scale( viewBorderForHolder, 1, 0.92f, 800, new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); AnimUtils.scale(viewBorderForHolder, 0.92f, 1, 350, null); AnimUtils.scale(animateStroke, 0.92f, 1, 350, null); } }); setToolbarTitle(getString(R.string.recording_)); }
private void animateViewBorder() { AnimUtils.scale( animateStroke, 1, scale, 1000, new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); if (animating) { animateViewBorder(); } } }); }
private void stopAnimating() { animating = false; animateStroke.setVisibility(View.GONE); AnimUtils.fadeThenGoneOrVisible(animateSolid, 1, 0, 300); AnimUtils.scale(startRec, 0.85f, 1, 200, null); AnimUtils.translateY(startRec, -20, 0, 200, null); AnimUtils.fade( tvSave, 1, 0, 200, new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); tvSave.setVisibility(View.INVISIBLE); } }); AnimUtils.translateY(tvSave, -20, 0, 200, null); setToolbarTitle(getString(R.string.audio)); }