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 Search | Active Topics | Log In | Register

Abort scrolling Options · View
roman125
#1 Posted : Monday, August 06, 2012 1:21:15 PM
Rank: Newbie

Groups: Registered

Joined: 6/5/2012
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 07, 2012 11:18:34 AM
Rank: Developers Team


Groups: Registered, Administrators

Joined: 7/28/2009
Posts: 447
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-2016 ArtfulBits. All rights reserved.