microsoftarchive / android-sliding-layer-lib

Highly customizable SlidingLayer as you have seen in Wunderlist
http://wunderlist.com
Apache License 2.0
932 stars 277 forks source link

Swipe other view then open the slidinglayer #119

Open huynhdq91 opened 4 years ago

huynhdq91 commented 4 years ago

Hi, I have a problem with passing event to the slidinglayer. What I want: when swipe on other view, the slidinglayer will start slide and open (same when we swipe the slidinglayer itself). I tried pass the touch event to slidinglayer but both of them didn't work. Please help me. Thanks.

        rootView.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                return slidingLayer.onTouchEvent(event);
            }
        });
        //or
        rootView.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                return slidingLayer.onInterceptTouchEvent(event);
            }
        });