use of com.actionbarsherlock.internal.nineoldandroids.animation.ObjectAnimator in project httpclient by pixmob.
the class AbsActionBarView method animateToVisibility.
public void animateToVisibility(int visibility) {
if (mVisibilityAnim != null) {
mVisibilityAnim.cancel();
}
if (visibility == VISIBLE) {
if (getVisibility() != VISIBLE) {
setAlpha(0);
if (mSplitView != null && mMenuView != null) {
mMenuView.setAlpha(0);
}
}
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 1);
anim.setDuration(FADE_DURATION);
anim.setInterpolator(sAlphaInterpolator);
if (mSplitView != null && mMenuView != null) {
AnimatorSet set = new AnimatorSet();
ObjectAnimator splitAnim = ObjectAnimator.ofFloat(mMenuView, "alpha", 1);
splitAnim.setDuration(FADE_DURATION);
set.addListener(mVisAnimListener.withFinalVisibility(visibility));
set.play(anim).with(splitAnim);
set.start();
} else {
anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
anim.start();
}
} else {
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 0);
anim.setDuration(FADE_DURATION);
anim.setInterpolator(sAlphaInterpolator);
if (mSplitView != null && mMenuView != null) {
AnimatorSet set = new AnimatorSet();
ObjectAnimator splitAnim = ObjectAnimator.ofFloat(mMenuView, "alpha", 0);
splitAnim.setDuration(FADE_DURATION);
set.addListener(mVisAnimListener.withFinalVisibility(visibility));
set.play(anim).with(splitAnim);
set.start();
} else {
anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
anim.start();
}
}
}
use of com.actionbarsherlock.internal.nineoldandroids.animation.ObjectAnimator in project AndroidTraining by mixi-inc.
the class ScrollingTabContainerView method animateToVisibility.
public void animateToVisibility(int visibility) {
if (mVisibilityAnim != null) {
mVisibilityAnim.cancel();
}
if (visibility == VISIBLE) {
if (getVisibility() != VISIBLE) {
setAlpha(0);
}
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 1);
anim.setDuration(FADE_DURATION);
anim.setInterpolator(sAlphaInterpolator);
anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
anim.start();
} else {
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 0);
anim.setDuration(FADE_DURATION);
anim.setInterpolator(sAlphaInterpolator);
anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
anim.start();
}
}
use of com.actionbarsherlock.internal.nineoldandroids.animation.ObjectAnimator in project AndroidTraining by mixi-inc.
the class AbsActionBarView method animateToVisibility.
public void animateToVisibility(int visibility) {
if (mVisibilityAnim != null) {
mVisibilityAnim.cancel();
}
if (visibility == VISIBLE) {
if (getVisibility() != VISIBLE) {
setAlpha(0);
if (mSplitView != null && mMenuView != null) {
mMenuView.setAlpha(0);
}
}
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 1);
anim.setDuration(FADE_DURATION);
anim.setInterpolator(sAlphaInterpolator);
if (mSplitView != null && mMenuView != null) {
AnimatorSet set = new AnimatorSet();
ObjectAnimator splitAnim = ObjectAnimator.ofFloat(mMenuView, "alpha", 1);
splitAnim.setDuration(FADE_DURATION);
set.addListener(mVisAnimListener.withFinalVisibility(visibility));
set.play(anim).with(splitAnim);
set.start();
} else {
anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
anim.start();
}
} else {
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 0);
anim.setDuration(FADE_DURATION);
anim.setInterpolator(sAlphaInterpolator);
if (mSplitView != null && mMenuView != null) {
AnimatorSet set = new AnimatorSet();
ObjectAnimator splitAnim = ObjectAnimator.ofFloat(mMenuView, "alpha", 0);
splitAnim.setDuration(FADE_DURATION);
set.addListener(mVisAnimListener.withFinalVisibility(visibility));
set.play(anim).with(splitAnim);
set.start();
} else {
anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
anim.start();
}
}
}
use of com.actionbarsherlock.internal.nineoldandroids.animation.ObjectAnimator in project ActionBarSherlock by JakeWharton.
the class ScrollingTabContainerView method animateToVisibility.
public void animateToVisibility(int visibility) {
if (mVisibilityAnim != null) {
mVisibilityAnim.cancel();
}
if (visibility == VISIBLE) {
if (getVisibility() != VISIBLE) {
setAlpha(0);
}
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 1);
anim.setDuration(FADE_DURATION);
anim.setInterpolator(sAlphaInterpolator);
anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
anim.start();
} else {
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 0);
anim.setDuration(FADE_DURATION);
anim.setInterpolator(sAlphaInterpolator);
anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
anim.start();
}
}
use of com.actionbarsherlock.internal.nineoldandroids.animation.ObjectAnimator in project ActionBarSherlock by JakeWharton.
the class AbsActionBarView method animateToVisibility.
public void animateToVisibility(int visibility) {
if (mVisibilityAnim != null) {
mVisibilityAnim.cancel();
}
if (visibility == VISIBLE) {
if (getVisibility() != VISIBLE) {
setAlpha(0);
if (mSplitView != null && mMenuView != null) {
mMenuView.setAlpha(0);
}
}
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 1);
anim.setDuration(FADE_DURATION);
anim.setInterpolator(sAlphaInterpolator);
if (mSplitView != null && mMenuView != null) {
AnimatorSet set = new AnimatorSet();
ObjectAnimator splitAnim = ObjectAnimator.ofFloat(mMenuView, "alpha", 1);
splitAnim.setDuration(FADE_DURATION);
set.addListener(mVisAnimListener.withFinalVisibility(visibility));
set.play(anim).with(splitAnim);
set.start();
} else {
anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
anim.start();
}
} else {
ObjectAnimator anim = ObjectAnimator.ofFloat(this, "alpha", 0);
anim.setDuration(FADE_DURATION);
anim.setInterpolator(sAlphaInterpolator);
if (mSplitView != null && mMenuView != null) {
AnimatorSet set = new AnimatorSet();
ObjectAnimator splitAnim = ObjectAnimator.ofFloat(mMenuView, "alpha", 0);
splitAnim.setDuration(FADE_DURATION);
set.addListener(mVisAnimListener.withFinalVisibility(visibility));
set.play(anim).with(splitAnim);
set.start();
} else {
anim.addListener(mVisAnimListener.withFinalVisibility(visibility));
anim.start();
}
}
}
Aggregations