Created
May 21, 2018 15:38
-
-
Save Binary-Finery/1981af0cc4662c2b2d37466785d7cf40 to your computer and use it in GitHub Desktop.
animate menu fabs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void hideMenuFabs() { | |
isFabRotated = false; | |
fab.startAnimation(AnimationUtils.loadAnimation(MainActivity.this, R.anim.fab_backwards)); | |
new Handler().postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
fabShare.startAnimation(AnimationUtils.loadAnimation(MainActivity.this, R.anim.zoom_gone)); | |
fabShare.setVisibility(View.INVISIBLE); | |
fab.setClickable(true); | |
} | |
}, 100); | |
fabSave.startAnimation(AnimationUtils.loadAnimation(MainActivity.this, R.anim.zoom_gone)); | |
fabSave.setVisibility(View.INVISIBLE); | |
} | |
private void showMenuFabs() { | |
isFabRotated = true; | |
fab.startAnimation(AnimationUtils.loadAnimation(MainActivity.this, R.anim.fab_forward)); | |
new Handler().postDelayed(new Runnable() { | |
@Override | |
public void run() { | |
fabSave.setVisibility(View.VISIBLE); | |
fabSave.startAnimation(AnimationUtils.loadAnimation(MainActivity.this, R.anim.zoom_appear)); | |
fab.setClickable(true); | |
} | |
}, 100); | |
fabShare.setVisibility(View.VISIBLE); | |
fabShare.startAnimation(AnimationUtils.loadAnimation(MainActivity.this, R.anim.zoom_appear)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment