¡@

Home 

2014/10/16 ¤W¤È 08:18:46

android Programming Glossary: maxright

Android: Scrolling an Imageview

http://stackoverflow.com/questions/3058164/android-scrolling-an-imageview

2 screenWidth 2 int maxY int bitmapHeight 2 screenHeight 2 set scroll limits final int maxLeft maxX 1 final int maxRight maxX final int maxTop maxY 1 final int maxBottom maxY set touchlistener ImageView_BitmapView.setOnTouchListener new View.OnTouchListener.. scrollByX totalX maxLeft scrolling to right side of image pic moving to the left if currentX downX if totalX maxRight scrollByX 0 if totalX maxRight totalX totalX scrollByX if totalX maxRight scrollByX maxRight totalX scrollByX.. to right side of image pic moving to the left if currentX downX if totalX maxRight scrollByX 0 if totalX maxRight totalX totalX scrollByX if totalX maxRight scrollByX maxRight totalX scrollByX totalX maxRight scrolling to..