@@ -45,6 +45,7 @@ public class KeyButtonView extends ImageView {
4545 private static final String TAG = "StatusBar.KeyButtonView" ;
4646
4747 final float GLOW_MAX_SCALE_FACTOR = 1.8f ;
48+ final float BUTTON_QUIESCENT_ALPHA = 0.6f ;
4849
4950 IWindowManager mWindowManager ;
5051 long mDownTime ;
@@ -86,7 +87,7 @@ public KeyButtonView(Context context, AttributeSet attrs, int defStyle) {
8687
8788 mGlowBG = a .getDrawable (R .styleable .KeyButtonView_glowBackground );
8889 if (mGlowBG != null ) {
89- mDrawingAlpha = 0.5f ;
90+ mDrawingAlpha = BUTTON_QUIESCENT_ALPHA ;
9091 }
9192
9293 a .recycle ();
@@ -175,8 +176,10 @@ public void setPressed(boolean pressed) {
175176 if (pressed != isPressed ()) {
176177 AnimatorSet as = new AnimatorSet ();
177178 if (pressed ) {
178- if (mGlowScale < 1.7f ) mGlowScale = 1.7f ;
179- if (mGlowAlpha < 0.5f ) mGlowAlpha = 0.5f ;
179+ if (mGlowScale < GLOW_MAX_SCALE_FACTOR )
180+ mGlowScale = GLOW_MAX_SCALE_FACTOR ;
181+ if (mGlowAlpha < BUTTON_QUIESCENT_ALPHA )
182+ mGlowAlpha = BUTTON_QUIESCENT_ALPHA ;
180183 setDrawingAlpha (1f );
181184 as .playTogether (
182185 ObjectAnimator .ofFloat (this , "glowAlpha" , 1f ),
@@ -187,7 +190,7 @@ public void setPressed(boolean pressed) {
187190 as .playTogether (
188191 ObjectAnimator .ofFloat (this , "glowAlpha" , 0f ),
189192 ObjectAnimator .ofFloat (this , "glowScale" , 1f ),
190- ObjectAnimator .ofFloat (this , "drawingAlpha" , 0.5f )
193+ ObjectAnimator .ofFloat (this , "drawingAlpha" , BUTTON_QUIESCENT_ALPHA )
191194 );
192195 as .setDuration (500 );
193196 }
0 commit comments