@@ -30,8 +30,8 @@ public class SwipeLayout extends FrameLayout {
3030 private DragEdge mDragEdge ;
3131 private ShowMode mShowMode ;
3232
33- private float horizontalSwipeOffset ;
34- private float verticalSwipeOffset ;
33+ private float mHorizontalSwipeOffset ;
34+ private float mVerticalSwipeOffset ;
3535
3636 private List <SwipeListener > mSwipeListeners = new ArrayList <SwipeListener >();
3737 private List <SwipeDenier > mSwipeDeniers = new ArrayList <SwipeDenier >();
@@ -68,8 +68,8 @@ public SwipeLayout(Context context, AttributeSet attrs, int defStyle) {
6868
6969 TypedArray a = context .obtainStyledAttributes (attrs , R .styleable .SwipeLayout );
7070 int ordinal = a .getInt (R .styleable .SwipeLayout_drag_edge , DragEdge .Right .ordinal ());
71- horizontalSwipeOffset =a .getDimension (R .styleable .SwipeLayout_horizontalSwipeOffset ,0 );
72- verticalSwipeOffset =a .getDimension (R .styleable .SwipeLayout_verticalSwipeOffset ,0 );
71+ mHorizontalSwipeOffset =a .getDimension (R .styleable .SwipeLayout_horizontalSwipeOffset ,0 );
72+ mVerticalSwipeOffset =a .getDimension (R .styleable .SwipeLayout_verticalSwipeOffset ,0 );
7373 mDragEdge = DragEdge .values ()[ordinal ];
7474 ordinal = a .getInt (R .styleable .SwipeLayout_show_mode , ShowMode .PullOut .ordinal ());
7575 mShowMode = ShowMode .values ()[ordinal ];
@@ -662,9 +662,9 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
662662 super .onMeasure (widthMeasureSpec , heightMeasureSpec );
663663
664664 if (mDragEdge == DragEdge .Left || mDragEdge == DragEdge .Right )
665- mDragDistance = getBottomView ().getMeasuredWidth ()-dp2px (horizontalSwipeOffset );
665+ mDragDistance = getBottomView ().getMeasuredWidth ()-dp2px (mHorizontalSwipeOffset );
666666 else
667- mDragDistance = getBottomView ().getMeasuredHeight ()-dp2px (verticalSwipeOffset );
667+ mDragDistance = getBottomView ().getMeasuredHeight ()-dp2px (mVerticalSwipeOffset );
668668 }
669669
670670 private boolean mTouchConsumedByChild = false ;
0 commit comments