Code example for TimePicker

Methods: clearFocusgetCurrentHourgetCurrentMinute

0
 
		@Override 
		public void onClick(DialogInterface dialog, int which) { 
			switch (which) { 
			case DialogInterface.BUTTON_POSITIVE: 
				timePicker.clearFocus(); 
				result = timePicker.getCurrentHour() + "-" 
						+ timePicker.getCurrentMinute(); 
				persistString(result); 
				callChangeListener(result); 
				dialog.dismiss(); 
				break; 
			case DialogInterface.BUTTON_NEGATIVE: 
				dialog.dismiss(); 
				break; 
			} 
 
		} 
	}; 
 
Contextual code suggestions in your IDE  Get Codota for Java