Methods Summary |
---|
public android.view.View | getMirror()
return mBrightnessMirror;
|
public void | hideMirror()
mScrimBehind.animateViewAlpha(1.0f, TRANSITION_DURATION_IN, PhoneStatusBar.ALPHA_IN);
inAnimation(mPanelHolder.animate())
.withLayer()
.withEndAction(new Runnable() {
@Override
public void run() {
mBrightnessMirror.setVisibility(View.GONE);
}
});
|
private android.view.ViewPropertyAnimator | inAnimation(android.view.ViewPropertyAnimator a)
return a.alpha(1.0f)
.setDuration(TRANSITION_DURATION_IN)
.setInterpolator(PhoneStatusBar.ALPHA_IN);
|
private android.view.ViewPropertyAnimator | outAnimation(android.view.ViewPropertyAnimator a)
return a.alpha(0.0f)
.setDuration(TRANSITION_DURATION_OUT)
.setInterpolator(PhoneStatusBar.ALPHA_OUT);
|
public void | setLocation(android.view.View original)
original.getLocationInWindow(mInt2Cache);
int originalY = mInt2Cache[1];
mBrightnessMirror.getLocationInWindow(mInt2Cache);
int mirrorY = mInt2Cache[1];
mBrightnessMirror.setTranslationY(mBrightnessMirror.getTranslationY()
+ originalY - mirrorY);
|
public void | showMirror()
mBrightnessMirror.setVisibility(View.VISIBLE);
mScrimBehind.animateViewAlpha(0.0f, TRANSITION_DURATION_OUT, PhoneStatusBar.ALPHA_OUT);
outAnimation(mPanelHolder.animate())
.withLayer();
|
public void | updateResources()
FrameLayout.LayoutParams lp =
(FrameLayout.LayoutParams) mBrightnessMirror.getLayoutParams();
lp.width = mBrightnessMirror.getResources().getDimensionPixelSize(
R.dimen.notification_panel_width);
lp.gravity = mBrightnessMirror.getResources().getInteger(
R.integer.notification_panel_layout_gravity);
mBrightnessMirror.setLayoutParams(lp);
int padding = mBrightnessMirror.getResources().getDimensionPixelSize(
R.dimen.notification_side_padding);
mBrightnessMirror.setPadding(padding, mBrightnessMirror.getPaddingTop(),
padding, mBrightnessMirror.getPaddingBottom());
|