@@ -63,6 +63,8 @@ public class ResideMenu extends FrameLayout{
6363 private int scaleDirection = DIRECTION_LEFT ;
6464 private int pressedState = PRESSED_DOWN ;
6565 private List <Integer > disabledSwipeDirection = new ArrayList <Integer >();
66+ //valid scale factor is between 0.0f and 1.0f.
67+ private float mScaleValue = 0.5f ;
6668
6769 public ResideMenu (Context context ) {
6870 super (context );
@@ -256,9 +258,9 @@ public void openMenu(int direction){
256258 setScaleDirection (direction );
257259
258260 isOpened = true ;
259- AnimatorSet scaleDown_activity = buildScaleDownAnimation (viewActivity , 0.5f , 0.5f );
261+ AnimatorSet scaleDown_activity = buildScaleDownAnimation (viewActivity , mScaleValue , mScaleValue );
260262 AnimatorSet scaleDown_shadow = buildScaleDownAnimation (imageViewShadow ,
261- 0.5f + shadowAdjustScaleX , 0.5f + shadowAdjustScaleY );
263+ mScaleValue + shadowAdjustScaleX , mScaleValue + shadowAdjustScaleY );
262264 AnimatorSet alpha_menu = buildMenuAnimation (scrollViewMenu , 1.0f );
263265 scaleDown_shadow .addListener (animationListener );
264266 scaleDown_activity .playTogether (scaleDown_shadow );
@@ -568,6 +570,10 @@ public int getScreenWidth(){
568570 activity .getWindowManager ().getDefaultDisplay ().getMetrics (displayMetrics );
569571 return displayMetrics .widthPixels ;
570572 }
573+
574+ public void setScaleValue (float scaleValue ) {
575+ this .mScaleValue = scaleValue ;
576+ }
571577
572578 public interface OnMenuListener {
573579
0 commit comments