Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to scroll expanded fragment #4

Closed
3lywa opened this issue Nov 16, 2015 · 4 comments
Closed

Unable to scroll expanded fragment #4

3lywa opened this issue Nov 16, 2015 · 4 comments

Comments

@3lywa
Copy link

3lywa commented Nov 16, 2015

I've implemented a viewpager + tabs as the expanded fragment. Each viewpager has a recyclerview. I'm able to swipe left and right with no problems, however, swipping up/down is not possible!

@sahildave
Copy link
Owner

Can you fork the repo and create a demo?

@3lywa
Copy link
Author

3lywa commented Nov 21, 2015

Demo created at https://github.com/3lywa/Search-View-Layout

Please let me know if you have any questions.

@sahildave
Copy link
Owner

Hey @3lywa You need to intercept the touch event and disallow the parent. Use this in your project. Refer the sample for more.

stops.setOnTouchListener(new View.OnTouchListener() {
    // Setting on Touch Listener for handling the touch inside ScrollView
    @Override
    public boolean onTouch(View v, MotionEvent event) {
        // Disallow the touch request for parent scroll on touch of child view
        v.getParent().requestDisallowInterceptTouchEvent(true);
        return false;
    }
});

@3lywa
Copy link
Author

3lywa commented Nov 22, 2015

Thank you for the quick response @sahildave, i tried the sample and its working fine now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants