Android : cross hair keeps appearing on swiping to new pages


#1

Hi,

 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.

-Naresh

British Gas Connected Homes


#2

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:

http://developer.android.com/reference/android/support/v4/view/ViewPager.SimpleOnPageChangeListener.html#onPageScrollStateChanged(int)

http://www.shinobicontrols.com/docs/ShinobiControls/ShinobiChartsAndroid/1.5.1/Premium/Normal/apidocs/docs/reference/com/shinobicontrols/charts/CartesianSeries.html#setCrosshairEnabled(boolean)

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

Thanks,

Kai.