• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic