This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using animations inside a view object to pan / zoom around a large image

 
Mike Shoe
Greenhorn
Posts: 1
Android Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I'm new to android development and have a question regarding animating an image within a custom view. I've created a custom view to display a bitmap image without any trouble. The image is over-sized and extends the frame of the screen, which is what I want. But now I want to be able to scroll to particular predetermined regions of the image based upon a gesture. I am able to get the functionality using a gesture listener with mView.scrollTo(x, y); or even mView.scrollBy(x,y) within the gesture handlers. However, the position movement is very dramatic, and I need to slow it down so that is smoothly scrolls to the regions. The effect is similar to Dr Suess eBooks available in the android market...here's a video demo that show the "panning" effect http://www.examiner.com/technology-in-national/dr-seuss-android-video -- I'm not really creating an ebook but the effect is the same, being able to swipe and have the screen move around to predetermined spots on the image detailing notes at each point. I do not want to scroll to follow finger gestures on the screen, i just want to be trigger the move to a new location via a swipe. I've been able to get this working by animating the view in an xml file, but that simply animates the entire view object and moves it around the screen. I want the same effect INSIDE the view object. Is there a way to slow down the scrollTo(x,y) function? or am I totally going in the wrong direction with how to do this?
Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic