MikeOrtiz / TouchImageView

Adds touch functionality to Android ImageView.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disable scrolling on specific area in ViewPager

arunarajput opened this issue · comments

I have a custom ViewPager so inside this view pager I have different fragments so in first fragment I have a TouchImageView which contain 360 degree rotatable image. When I'm swiping left or right for the Touchimageview so back viewpager event also triggering means viewpager is scrolling so I want to disable viewpager touch event for this Touchimageview area.

Eg: ViewPager -> Fragment -> TouchImageView

How can I disable custom viewpager touch event when I'm interacting with TouchImageview and If I'm not interacting with touchimageview then viewpager touch event should work?

I'm not 100% sure what you want.

Anyway, maybe this points you in the right direction https://github.com/MikeOrtiz/TouchImageView/pull/317/files#diff-aab9fc04af15e52d80b1fc7ee0665aa2f48f610bc02dd8504088dfd5a422bb81R22-R24

Or maybe you to debug into PrivateOnTouchListener : OnTouchListener

No its not useful for me...I want a solution that inside view pager I have total 5 fragment and in 1st fragment I have TouchImageview where I have added swiping functionality for images....when touchlistener is triggering for imageview so viewpager touchlistener should be lock/disable and vice versa. my problem is that when I'm swiping images so instead of image, view pager touchlistener is triggering. How can I resolve this vice versa condition ?

Of course it's not a solution, it's just a direction. To debug and implement is your task

commented

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

commented

Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.