Sweet, I will do!
In the mean time I figured out my issue and this creates a simple dragable
image view. I need to work in restriction so you can't drag the image
totally off the view but it does what I need. The code is below for anyone
who might need to do the same simple thing:
public boolean onScroll(MotionEvent e1, MotionEvent e2,
float
distanceX, float distanceY) {
//Left / Right
radarImage.scrollBy((int)distanceX, 0);
//Up/Down
radarImage.scrollBy(0,(int)distanceY);
return false;
}
From: [email protected]
[mailto:[email protected]] On Behalf Of Wayne Wenthin
Sent: Wednesday, July 14, 2010 1:26 PM
To: [email protected]
Subject: Re: [android-developers] Help with Gestures please
Search the market for sony ericson tutorial it is pretty good and has some
interesting features and pointers.
On Wed, Jul 14, 2010 at 10:17 AM, Tommy <[email protected]> wrote:
Hi everyone,
I have an image view that takes up more than the screen space so I
want to implement some custom scrolling with gestures I basically want
to be able to drag(scroll) the image right,left, down, up. I sort of
have the left right working, it isn't very smooth but it works. How do
I get up/down to be recognized? Are there any examples I can look at
that show this right,left,up,down gesture behavior? Here is the code I
currently have:
public boolean onScroll(MotionEvent e1, MotionEvent e2,
float distanceX, float distanceY) {
// TODO Auto-generated method stub
//Left
if(e1.getX()>e2.getX()){
radarImage.scrollBy(10, 0);
//Right
}else if(e1.getX() < e2.getX()){
radarImage.scrollBy(-10, 0);
}
return false;
}
Thanks so much for the help, I truly appreciate it,
Tommy
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
<mailto:android-developers%[email protected]>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
Follow us on Twitter @fuliginsoftware
Join the forums.
http://www.fuligin.com/forums
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en