Skip to content

Commit

Permalink
repair #17
Browse files Browse the repository at this point in the history
  • Loading branch information
lucklygaj committed Aug 16, 2017
1 parent 3414c20 commit e5f5752
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ A sliding menu library not just for recyclerview, but all views.

- You need to add library dependencies infomation to build.gradle in your module.

compile 'com.github.anzaizai:EasySwipeMenuLayout:1.1.1'
compile 'com.github.anzaizai:EasySwipeMenuLayout:1.1.2'

- last releases version is 1.1.1 can be use
- last releases version is 1.1.2 can be use

## step 3
- User EasySwipeMenuLayout as the top-level root layout the needs to be added slide swipe menu the funcation views.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,12 +268,12 @@ public boolean dispatchTouchEvent(MotionEvent ev) {
// System.out.println(">>>>dispatchTouchEvent() ACTION_MOVE getScrollX:" + getScrollX());
float distanceX = mLastP.x - ev.getRawX();
float distanceY = mLastP.y - ev.getRawY();
if (Math.abs(distanceY) > mScaledTouchSlop && Math.abs(distanceX) > mScaledTouchSlop && Math.abs(distanceY) > Math.abs(distanceX)) {
break;
}
if (Math.abs(distanceX) <= mScaledTouchSlop){
if (Math.abs(distanceY) > mScaledTouchSlop && Math.abs(distanceY) > Math.abs(distanceX)) {
break;
}
// if (Math.abs(distanceX) <= mScaledTouchSlop){
// break;
// }
// Log.i(TAG, ">>>>>distanceX:" + distanceX);

scrollBy((int) (distanceX), 0);//滑动使用scrollBy
Expand Down

0 comments on commit e5f5752

Please sign in to comment.