Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.

Commit

Permalink
* you won't believe. some more finetuning for the animations
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepenz committed Jan 27, 2015
1 parent 3ee55aa commit 8383ce5
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void onClick(View v) {

animateStart();

mFabButton.animate().rotationBy(360).setDuration(ANIMATION_DURATION_MEDIUM).setListener(new CustomAnimatorListener() {
mFabButton.animate().rotation(360).setDuration(ANIMATION_DURATION_LONG).setListener(new CustomAnimatorListener() {
@Override
public void onAnimationEnd(Animator animation) {
downloadAndSetOrShareImage(false);
Expand Down Expand Up @@ -205,7 +205,7 @@ public void onClick(View v) {

animateStart();

mFabButton.animate().rotationBy(360).setDuration(ANIMATION_DURATION_MEDIUM).setListener(new CustomAnimatorListener() {
mFabButton.animate().rotation(360).setDuration(ANIMATION_DURATION_LONG).setListener(new CustomAnimatorListener() {
@Override
public void onAnimationEnd(Animator animation) {
streamAndSetImage();
Expand Down Expand Up @@ -236,7 +236,7 @@ public boolean onLongClick(View v) {

animateStart();

mFabButton.animate().rotationBy(360).setDuration(ANIMATION_DURATION_MEDIUM).setListener(new CustomAnimatorListener() {
mFabButton.animate().rotation(360).setDuration(ANIMATION_DURATION_LONG).setListener(new CustomAnimatorListener() {
@Override
public void onAnimationEnd(Animator animation) {
downloadAndSetOrShareImage(true);
Expand Down Expand Up @@ -401,7 +401,6 @@ private void animateStart() {

mFabButton.setImageDrawable(mDrawableClose);


//animate the button back to blue. just do it the first time
if (mFabButton.getTag() != null) {
TransitionDrawable transition = (TransitionDrawable) mFabButton.getBackground();
Expand All @@ -428,7 +427,7 @@ private void animateReset() {
mProgressFabAnimation.cancel();
//Utils.animateViewElevation(mFabButton, 0, mElavationPx);
mFabButton.setImageDrawable(mDrawablePhoto);
mFabButton.animate().rotationBy(360).setDuration(ANIMATION_DURATION_MEDIUM).start();
mFabButton.animate().rotation(360).setDuration(ANIMATION_DURATION_MEDIUM).start();

mFabShareButton.animate().translationY(Utils.pxFromDp(DetailActivity.this, 64)).setDuration(ANIMATION_DURATION_MEDIUM).start();
}
Expand All @@ -438,7 +437,7 @@ private void animateReset() {
*/
private void animateCompleteFirst(boolean success) {
//some nice animations so the user knows the wallpaper was set properly
mFabButton.animate().rotationBy(720).setDuration(ANIMATION_DURATION_EXTRA_LONG).start();
mFabButton.animate().rotation(720).setDuration(ANIMATION_DURATION_EXTRA_LONG).start();
mFabButton.setImageDrawable(mDrawableSuccess);

//animate the button to green. just do it the first time
Expand Down Expand Up @@ -472,7 +471,7 @@ private void animateComplete(boolean success) {
if (!success) {
//Utils.animateViewElevation(mFabButton, 0, mElavationPx);
mFabButton.setImageDrawable(mDrawablePhoto);
mFabButton.animate().rotationBy(360).setDuration(ANIMATION_DURATION_MEDIUM).start();
mFabButton.animate().rotation(360).setDuration(ANIMATION_DURATION_MEDIUM).start();
}
future = null;
}
Expand Down

0 comments on commit 8383ce5

Please sign in to comment.