Code example for HorizontalScrollView

Methods: postDelayedgetMaxScrollAmount

0
	private int bannerPos, maxBannerPos;
	private boolean right = true;
	 
	private void startBannerScroll() {		 
		if(maxBannerPos == 0)
			maxBannerPos = banner.getMaxScrollAmount();
		 
		banner.postDelayed(new Runnable() {
			 
			@Override 
			public void run() { 
				if(right)
					bannerPos++;
				else 
					bannerPos--;
				 
				banner.scrollTo(bannerPos, 0);
				 
				if(bannerPos == maxBannerPos || bannerPos == 0)
					right = !right;
Stop searching for code, let great code find you!  Add Codota to your java IDE