Methods Summary |
---|
private void | animateText(boolean nowVisible, java.lang.Runnable onFinishedRunnable)Animate the text to a new visibility.
if (nowVisible != mIsVisible) {
// Animate text
float endValue = nowVisible ? 1.0f : 0.0f;
Interpolator interpolator;
if (nowVisible) {
interpolator = PhoneStatusBar.ALPHA_IN;
} else {
interpolator = PhoneStatusBar.ALPHA_OUT;
}
mAnimating = true;
mContent.animate()
.alpha(endValue)
.setInterpolator(interpolator)
.setDuration(260)
.withEndAction(new Runnable() {
@Override
public void run() {
mAnimating = false;
if (onFinishedRunnable != null) {
onFinishedRunnable.run();
}
}
});
mIsVisible = nowVisible;
} else {
if (onFinishedRunnable != null) {
onFinishedRunnable.run();
}
}
|
public void | cancelAnimation()
mContent.animate().cancel();
|
protected abstract android.view.View | findContentView()
|
public boolean | hasOverlappingRendering()
return false;
|
public boolean | isTransparent()
return true;
|
public boolean | isVisible()
return mIsVisible || mAnimating;
|
protected void | onFinishInflate()
super.onFinishInflate();
mContent = findContentView();
setInvisible();
|
protected void | onLayout(boolean changed, int left, int top, int right, int bottom)
super.onLayout(changed, left, top, right, bottom);
setOutlineProvider(null);
|
public void | performAddAnimation(long delay, long duration)
// TODO: use delay and duration
performVisibilityAnimation(true);
|
public void | performRemoveAnimation(long duration, float translationDirection, java.lang.Runnable onFinishedRunnable)
// TODO: Use duration
performVisibilityAnimation(false);
|
public void | performVisibilityAnimation(boolean nowVisible)
animateText(nowVisible, null /* onFinishedRunnable */);
|
public void | performVisibilityAnimation(boolean nowVisible, java.lang.Runnable onFinishedRunnable)
animateText(nowVisible, onFinishedRunnable);
|
public void | setInvisible()
mContent.setAlpha(0.0f);
mIsVisible = false;
|
public void | setWillBeGone(boolean willBeGone)
mWillBeGone = willBeGone;
|
public boolean | willBeGone()
return mWillBeGone;
|