Code example for ScrollView

Methods: scrollBy

0
 
		int originalY = view.getScrollY();
		final int scrollAmount = scrollTo;
		inst.runOnMainSync(new Runnable(){
			public void run(){ 
				view.scrollBy(0, scrollAmount);
			} 
		}); 
 
		if (originalY == view.getScrollY()) {
			return false; 
		} 
		else{ 
			return true; 
		} 
	} 
 
	/** 
	 * Scrolls a ScrollView to top or bottom. 
	 * 
	 * @param direction the direction to be scrolled