Code example for TimerTask

Methods: cancel

0
			    	moveScrollView(); 
			    } 
			}; 
			 
			if(scrollerSchedule != null){
				scrollerSchedule.cancel();
				scrollerSchedule = null;
			} 
			scrollerSchedule = new TimerTask(){
				@Override 
				public void run(){ 
					runOnUiThread(Timer_Tick);
				} 
			}; 
			 
			scrollTimer.schedule(scrollerSchedule, 30, 30);
		} 
	} 
     
    public void moveScrollView(){ 
    	scrollPos							= 	(int) (verticalScrollview.getScrollY() + 1.0);