whitespace COMPANY whitespace SERVICES whitespace PRODUCTS whitespace PURCHASE whitespace SUPPORT whitespace CONTACTS whitespace Home whitespace Contact Us whitespace Site Map whitespace
whitespace
SUPPORT
whitespace
FORUM
whitespace
FAQS
whitespace
SUBSCRIPTION
whitespace
REQUEST ON-LINE
whitespace
whitespace

Technical Support Forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
roman125  
#1 Posted : Monday, August 6, 2012 3:21:15 PM(UTC)
roman125
Rank: Newbie

Groups: Registered
Joined: 6/5/2012(UTC)
Posts: 4

My problem:
When I call xScale.zoomToRange() during animation scroll - animation doesn't stop and proceeds from previous zoom position.
So, how can I abort this animation?
Baydalka Volodymyr  
#2 Posted : Tuesday, August 7, 2012 1:18:34 PM(UTC)
Baydalka Volodymyr
Rank: Member

Groups: Registered
Joined: 7/28/2009(UTC)
Posts: 447
Man

Hi,

Unfortunately the is no API to do that. You may use workaround:

Code:
public class MyChartView extends ChartView
{
	static final int SCROLL_FLAGS = ChartGestureListener.ANIMATED_PANNING_FLAG // animation
			| ChartGestureListener.HORIZONTAL_PANNING_FLAG // horizontal scrolling
			| ChartGestureListener.VERTICAL_PANNING_FLAG; // vertical scrolling
	
	ChartGestureListener _gestureListener;

	public MyChartView(Context context)
  {
	  super(context);
	  
	  _gestureListener = new ChartGestureListener(this, SCROLL_FLAGS); // enable scrolling
	  setGestureDetector(_gestureListener);
  }
	
	public void stopScrolling()
	{
		_gestureListener.setFlags(ChartGestureListener.NONE_FLAG); // disable scrolling
		_gestureListener.onScroll(null, null, 0, 0); // imitate scrolling event to stop animation 
		_gestureListener.setFlags(SCROLL_FLAGS); // enable scrolling back
	}
}
Volodymyr Baydalka
Andriod development and support team
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Company | Services | Practices | Technologies | Career | Contacts | Privacy
© 2005-2017 ArtfulBits. All rights reserved.