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

Horizontal Scroll View inside my List-item is not working #31

Open
rajazeeshanahmed opened this issue Aug 6, 2015 · 6 comments
Open

Comments

@rajazeeshanahmed
Copy link

I've Horizontal Scroll view inside my every list-item but its scroll is not working. Whenever i try to swipe the horizontal scroll view, list-item swipe actions is called. Would you please tell me how to fix this? or any other alternative to horizontal scroll view?

@wdullaer
Copy link
Owner

wdullaer commented Aug 6, 2015

How would you expect this to work?
You can either use the horizontal swipe to scroll your scrollview, or to swipe the listview.

Even if you could get both widgets to play nice with one another it would lead to massively confusing user experience (is it going to scroll left, or am I going to trigger a delete on my item?)

If you need to place a horizontal scroll view in your listview, this would be a red flag to me and I would take a closer look at my design.

@rajazeeshanahmed
Copy link
Author

@wdullaer I'm following the google inbox design. Whole list-view item is not the horizontal scroll view but it only shows the attachments. In short it is totally the blue print of google inbox. Please check and then give your comments about that. Looking forward

@rajazeeshanahmed
Copy link
Author

@wdullaer waiting for your response. Please help!

@wdullaer
Copy link
Owner

The way the library is currently implemented, this is not possible.
The SwipeActionAdapter will steal the horizontal swipe before your HorizontalScrollView can process it.

@rajazeeshanahmed
Copy link
Author

@wdullaer just for the sake of argument, if i write this line in my adapter "attachment_view.getParent().requestDisallowInterceptTouchEvent(true);" it started working means horizontal scroll view items starts scrolling. but now another problem is that user can not scroll list by tapping on attachment view? Got my point?

@wdullaer
Copy link
Owner

What you're doing there is requesting my library not to treat the swipe events and it is complying. This is why you will never get the horizontal swipe.

What you could try to do is have your application code set and unset that flag at the appropriate times.

Like I said in the previous comment: this library is currently not set up to do this kind of work. It would need to inspect all its children for horizontal scroll behaviour, keep track of their horizontal scroll state and then pass the touch events as required.

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