Code example for TimePicker

Methods: setVisibility

0
		nextAlarmTimeTextView.setText(c.getDisplayName(Calendar.MONTH,
				Calendar.SHORT, Locale.US)
				+ " " 
				+ c.get(Calendar.DAY_OF_MONTH)
				+ " " + getPrettyTime()); 
		timePicker.setVisibility(View.GONE);
	} 
 
	private String getPrettyTime()
	{ 
		StringBuilder sb = new StringBuilder();
 
		if (DateFormat.is24HourFormat(this))
			sb.append(mHour);
		else 
		{ 
			if (c.get(Calendar.HOUR) == 12 || c.get(Calendar.HOUR) == 0)
				sb.append(12);
			else 
				sb.append(c.get(Calendar.HOUR));
		}