Gesture conflict with viewpager or some components else
Hi, because we have the viewPager in our view, I find it has some conflict with it's touch event. When you want to see the chart, especially when you zoomed the chart, you don't want to be disturbed by viewPager when you fling left or right. RecyclerView also face this issue but has a vertical action.
I am trying to handle it by calling requestDisallowInterceptTouchEvent in the onInterceptTouchEvent ,
but I have to know the zoom level of the current state.
Because when the chart is not zoomed, intercept all the events will cause the parent(like RecyclerView, ViewPage, etc.) not scroll, it's also not a good experience.
Is there some method to have the zoom level right now, or some better solution to fix it? Thanks!!
Hello @royorange ! I am currently looking for a solution to this problem.
Hi @soommy12 ,
The same issue is discovered when using the HIChartView in the ScrollView.
It also applies for a case when a user has started an interaction with a HIChartView in order to show a tooltip.
As @royorange mentioned, probably determining a case when a user has started a zoom operation or horizontal one-finger gesture over the chart view (showing a tooltip) and calling requestDisallowInterceptTouchEvent(true) could help (and then calling the oopsite requestDisallowInterceptTouchEvent(false) when the chart-related gesture is finished/canceled).
It's definitely a responsibility of a library view to prevent outer view containers from stealing it's touch events.
I've created a sample project where a HiChartView is placed inside of a vertically scrollable container (zoom and tooltip are enabled): https://github.com/adenisyuk/HighchartsScrolling
Thanks for the sample project, we really appreciate your effort. I will investigate.
Is there anything new with this issue?