Code example for NumberPicker

Methods: getValuesetEnabled

0
     
    public void retrieveTimeFromValues(){ 
    	int hrs = hours.getValue();
    	int mins = minutes.getValue();
    	int secs = seconds.getValue();
    	int mills = millis.getValue();
    	 
    	long time = (mills*100) + ( secs * 1000) + (mins * 60000) + (hrs * 360000);
    	postTimeOutAlarm(time);
    } 
     
    public void postTimeOutAlarm(long time){
    	hours.setEnabled(false);minutes.setEnabled(false); seconds.setEnabled(false);
    	millis.setEnabled(false);
    	 
    	ToastTimeOutRunnable runnable = new ToastTimeOutRunnable(getBaseContext(), time);
    	runnable.setListener(this);
    	handler.postDelayed(runnable, time);
    	 
    }