Android : cross hair keeps appearing on swiping to new pages



 We have a view pager implmentation to load individual graphs on each page. Each page has its own ShinobiChart displying the graph. User can just swipe through the pages to see a graph on each page. The issue is that when the user swipes from one page to another, besides showing the graph , the crosshair tooltip is appearing some times without user performing any long press gesture on the chart. It affects the page swipe behaviour. As the user has to now dismiss the crosshair tooltip to swipe to the next page. The cross hair tooltip does not come up for every page swipe. It comesup randomly some times on a page swipe

Is there a way to prevent the cross hair tooltip appearing by default on page swipes? It should appear only when user do a long press.


British Gas Connected Homes


Hello Naresh,

Thanks for getting in touch. We are sorry to hear that you are having problems with the crosshair and using ShinobiCharts for Android with a ViewPager. We are not currently aware of any problems with our crosshair implementation. I suspect that the level of tolerance between the detection of a swipe (page change) and a long press (crosshair activation) is quite small. As the chart must respond to any events placed within its boundary it is exteremely difficult for us to be able to distinguish an event intended for the chart from one intended for the container (in this case a ViewPager).

I suggest you experiment with the ViewPager’s functionality. It may be possible to intercept the start of a swipe event and temporarily disable the crosshair:

I hope that you find this information useful. If you need any further help please get back in touch.