Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCChart2D for Java
 Multiple TouchListeners on one chart
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

YuaNWA

Singapore
1 Posts

Posted - 27 Jun 2014 :  22:52:03  Show Profile  Reply with Quote
I would like to be able to have multiple touchlisteners on a single chart. From your user manual, it says that it is advisable to only have one touch listener active at a time.

I have hence created a radio group to control the type of touch listener being active. Do you have any advice or can I be pointed to somewhere on how to activate and deactivate the touch listeners?

Also that due to the library being initially based on Java, chartzoom works by a single touch. This has carried over to the Android version as well. Is it possible for me to subclass chartzoom to handle pinch zooming as per most Android graphics?

Also a suggestion that builds on that would be to actually combine chartzoom and movecoordinates to actually work together.If it detects 2 fingers, then it does chartzoom, if there is only one finger, it moves the chart around.

quinncurtis

1586 Posts

Posted - 29 Jun 2014 :  15:46:04  Show Profile  Reply with Quote
In the manual, the description for each TouchListener lists the method which can be used to enable/disable it: setDataToolTipEnable, setMoveObjEnable, setDataCursorEnable, setZoomEnable, setMoveCoordinatesEnable, etc..

Sorry, but it is unlikely you would be able to sub class the ChartZoom class to write your own which uses a pinch zoom. We experimented with it when we wrote the software, but that generation of Android touch screens produced too many invalid values on double touches and it could not be made to work with any accuracy or reliability. You would need the underlying source code of the QCChart2DAndroid library in order to figure out how to write your own.

There is no way to externally combine the ChartZoom and MoveCoordinates classes like you want. The only way would be to write a special TouchListener which combines the two in the QCChart2DAndroid library jar file. We could do that under contract if it is critical to your application.

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07