Code example for HorizontalScrollView

Methods: smoothScrollTo, getWidth

0
				break; 
			case MotionEvent.ACTION_UP:
				xEnd = (int) event.getX();
				Logger.debug("xStart: " + xStart + " xEnd: " + xEnd);
				Logger.debug("width: " + iv_right.getWidth());
				Logger.debug("hsv width: " + hsv.getWidth());
 
				int distance = xEnd - xStart;
				if (distance < 0)
				{ 
					hsv.smoothScrollTo(hsv.getWidth() + iv_right.getWidth(), 0);
				} 
				else 
				{ 
					hsv.smoothScrollTo(0, 0);
				} 
				break; 
			default: 
				break; 
			}