use of com.jams.music.player.Animations.TranslateAnimation in project JamsMusicPlayer by psaravan.
the class BrowserSubGridActivity method slideAwayHeader.
/**
*
*/
/**
* Slides away the header layout.
*/
private void slideAwayHeader() {
TranslateAnimation slideDown = new TranslateAnimation(mHeaderLayout, 400, new AccelerateInterpolator(2.0f), View.INVISIBLE, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -2.0f);
slideDown.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
mHeaderLayout.setVisibility(View.VISIBLE);
}
@Override
public void onAnimationEnd(Animation animation) {
mHeaderLayout.setVisibility(View.INVISIBLE);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
slideDown.animate();
}
use of com.jams.music.player.Animations.TranslateAnimation in project JamsMusicPlayer by psaravan.
the class PlaylistPagerFragment method hideLyrics.
/**
* Slides down the album art to hide lyrics.
*/
private void hideLyrics() {
TranslateAnimation slideDownAnimation = new TranslateAnimation(coverArt, 400, new DecelerateInterpolator(2.0f), View.VISIBLE, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -2.0f, Animation.RELATIVE_TO_SELF, 0.0f);
slideDownAnimation.animate();
}
use of com.jams.music.player.Animations.TranslateAnimation in project JamsMusicPlayer by psaravan.
the class BrowserSubListActivity method slideAwayHeader.
/**
* Slides away the header layout.
*/
private void slideAwayHeader() {
TranslateAnimation slideDown = new TranslateAnimation(mHeaderLayout, 400, new AccelerateInterpolator(2.0f), View.INVISIBLE, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, -2.0f);
slideDown.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationStart(Animation animation) {
mHeaderLayout.setVisibility(View.VISIBLE);
}
@Override
public void onAnimationEnd(Animation animation) {
mHeaderLayout.setVisibility(View.INVISIBLE);
}
@Override
public void onAnimationRepeat(Animation animation) {
}
});
slideDown.animate();
}
Aggregations