SwipeBackHelper.getCurrentPage(this)//get current instance
.setSwipeBackEnable(true)//on-off
.setSwipeEdge(200)//set the touch area。200 mean only the left 200px of screen can touch to begin swipe.
.setSwipeEdgePercent(0.2f)//0.2 mean left 20% of screen can touch to begin swipe.
.setSwipeSensitivity(0.5f)//sensitiveness of the gesture。0:slow 1:sensitive
.setScrimColor(Color.BLUE)//color of Scrim below the activity
.setClosePercent(0.8f)//close activity when swipe over this
.setSwipeRelateEnable(false)//if should move together with the following Activity
.setSwipeRelateOffset(500)//the Offset of following Activity when setSwipeRelateEnable(true)
.setDisallowInterceptTouchEvent(true)//your view can hand the events first.default false;
.addListener(new SwipeListener() {
@Override
public void onScroll(float percent, int px) {
}
@Override
public void onEdgeTouch() {
}
@Override
public void onScrollToClose() {
}
});
加上这一段就无法滑动返回,去掉才可以。刚拉的最新代码~