@@ -63,7 +63,9 @@ public class ResideMenu extends FrameLayout{
6363 private int scaleDirection = DIRECTION_LEFT ;
6464 private int pressedState = PRESSED_DOWN ;
6565 private List <Integer > disabledDirection = new ArrayList <Integer >();
66-
66+ //valid scale factor is between 0.0f and 1.0f.
67+ private float mScaleValue = 0.5f ;
68+
6769 public ResideMenu (Context context ) {
6870 super (context );
6971 initViews (context );
@@ -258,9 +260,9 @@ public void openMenu(int direction){
258260 setScaleDirection (direction );
259261
260262 isOpened = true ;
261- AnimatorSet scaleDown_activity = buildScaleDownAnimation (viewActivity , 0.5f , 0.5f );
263+ AnimatorSet scaleDown_activity = buildScaleDownAnimation (viewActivity , mScaleValue , mScaleValue );
262264 AnimatorSet scaleDown_shadow = buildScaleDownAnimation (imageViewShadow ,
263- 0.5f + shadowAdjustScaleX , 0.5f + shadowAdjustScaleY );
265+ mScaleValue + shadowAdjustScaleX , mScaleValue + shadowAdjustScaleY );
264266 AnimatorSet alpha_menu = buildMenuAnimation (scrollViewMenu , 1.0f );
265267 scaleDown_shadow .addListener (animationListener );
266268 scaleDown_activity .playTogether (scaleDown_shadow );
@@ -565,6 +567,10 @@ public int getScreenWidth(){
565567 activity .getWindowManager ().getDefaultDisplay ().getMetrics (displayMetrics );
566568 return displayMetrics .widthPixels ;
567569 }
570+
571+ public void setScaleValue (float scaleValue ) {
572+ this .mScaleValue = scaleValue ;
573+ }
568574
569575 public interface OnMenuListener {
570576
0 commit comments