Jude95 / SwipeBackHelper

make your activity can swipe to close
1.38k stars 268 forks source link

里面有ListView、Webview等,加上这段示例代码就不灵了。 #51

Closed smuyyh closed 7 years ago

smuyyh commented 7 years ago
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() {
                    }
                });

加上这一段就无法滑动返回,去掉才可以。刚拉的最新代码~

smuyyh commented 7 years ago

好吧我的错。sorry