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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en