TimePicker setCurrentMinute - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for TimePicker setCurrentMinute method.

This code example shows how to use the following methods:setCurrentHour, setCurrentMinute
			activityUtils.getCurrentActivity(false).runOnUiThread(new Runnable()
			{ 
				public void run() 
				{ 
					try{ 
						timePicker.setCurrentHour(hour);
						timePicker.setCurrentMinute(minute);
					}catch (Exception ignored){}
				} 
			}); 
		} 
	} 
	 
 
	/** 
	 * Sets the progress of a given {@link ProgressBar}. Examples are SeekBar and RatingBar. 
	 * @param progressBar the {@code ProgressBar} 
	 * @param progress the progress that the {@code ProgressBar} should be set to 
	 */ 
 
7
CodeRank
This code example shows how to use the following methods:setCurrentHour, setCurrentMinute, setIs24HourView, setOnTimeChangedListener
     * @see android.preference.DialogPreference#onCreateDialogView() 
     */ 
    @Override 
    protected View onCreateDialogView() {
 
        TimePicker tp = new TimePicker(getContext());
        tp.setIs24HourView(DateFormat.is24HourFormat(getContext()));
        tp.setOnTimeChangedListener(this);
        originalHour = getHour();
        originalMinute = getMinute();
        if (originalHour >= 0 && originalMinute >= 0) {
            tp.setCurrentHour(originalHour);
            tp.setCurrentMinute(originalMinute);
        } 
 
        return tp;
    } 
 
    /** 
     * @see 
9
CodeRank
This code example shows how to use the following methods:getCurrentHour, getCurrentMinute, setCurrentHour, setCurrentMinute
This code example shows how to use the following methods:getCurrentHour, getCurrentMinute, setCurrentHour, setCurrentMinute
This code example shows how to use the following methods:setCurrentHour, setCurrentMinute, setIs24HourView
This code example shows how to use the following methods:clearFocus, setCurrentHour, setCurrentMinute, setIs24HourView
	} 
	 
	@Override 
	protected View onCreateDialogView() {
		 
		mTimePicker = new TimePicker(getContext());
		mTimePicker.setIs24HourView(false);
		mTimePicker.setCurrentHour(mTime.getHour());
		mTimePicker.setCurrentMinute(mTime.getMinute());
		mTimePicker.clearFocus();
		return mTimePicker; 
	} 
 
	private void initialize() { 
		Calendar cal = Calendar.getInstance();
		handleTimeChange(cal.get(Calendar.HOUR_OF_DAY), 
						 cal.get(Calendar.MINUTE));
	} 
	 
	public void setTime(int hour, int minute) {
7
CodeRank
This code example shows how to use the following methods:setCurrentHour, setCurrentMinute, setIs24HourView, setOnTimeChangedListener
   *  
   * @return a DatePicker with the date set 
   */ 
  @Override 
  protected View onCreateDialogView() {
    TimePicker timePicker = new TimePicker(getContext());
    timePicker.setIs24HourView(android.text.format.DateFormat.is24HourFormat(getContext()));
    Calendar calendar = getTime();
    timePicker.setCurrentHour(calendar.get(Calendar.HOUR_OF_DAY));
    timePicker.setCurrentMinute(calendar.get(Calendar.MINUTE));
    timePicker.setOnTimeChangedListener(this);
    return timePicker;
  } 
 
  /** 
   * Produces the time used for the time picker. If the user has not selected a 
   * time, produces the default from the XML's android:defaultValue. If the 
   * default is not set in the XML or if the XML's default is invalid it uses 
   * the value produced by {@link #defaultCalendar()}. 
   *  
6
CodeRank
This code example shows how to use the following methods:setCurrentHour, setCurrentMinute, setIs24HourView, setOnTimeChangedListener
     * @see android.preference.DialogPreference#onCreateDialogView() 
     */ 
    @Override 
    protected View onCreateDialogView() {
 
        TimePicker tp = new TimePicker(getContext());
        tp.setIs24HourView(DateFormat.is24HourFormat(getContext()));
        tp.setOnTimeChangedListener(this);
        originalHour = getHour();
        originalMinute = getMinute();
        if (originalHour >= 0 && originalMinute >= 0) {
            tp.setCurrentHour(originalHour);
            tp.setCurrentMinute(originalMinute);
        } 
 
        return tp;
    } 
 
    /** 
     * @see 
6
CodeRank
This code example shows how to use the following methods:setCurrentHour, setCurrentMinute, setOnTimeChangedListener
     */ 
    @Override 
    protected View onCreateDialogView()
    { 
 
        TimePicker tp = new TimePicker(getContext());
        tp.setOnTimeChangedListener(this);
 
        int h = getHour();
        int m = getMinute();
        if (h >= 0 && m >= 0)
        { 
            tp.setCurrentHour(h);
            tp.setCurrentMinute(m);
        } 
 
        return tp;
    } 
 
    /* 
6
CodeRank
This code example shows how to use the following methods:setCurrentHour, setCurrentMinute, setEnabled, setOnTimeChangedListener
	} 
 
	private void disableControls() 
	{ 
		datePicker.setEnabled(false);
		timePicker.setEnabled(false);
		btnSetNow.setEnabled(false);
	} 
 
	private void initDateControls() 
	{ 
		datePicker.init(currentState.getInputDate().getYear(), currentState.getInputDate().getMonth(), currentState.getInputDate().getDay(), new DatePickerChangeListener());
		timePicker.setCurrentHour(currentState.getInputDate().getHour());
		timePicker.setCurrentMinute(currentState.getInputDate().getMinute());
		timePicker.setOnTimeChangedListener(new TimeChangedListener());
	} 
 
	void refreshDateControls() 
	{ 
		refreshingControls = true;
6
CodeRank

Related TimePicker setCurrentMinute Questions & Answers:

setCurrentMinute Method Overview
Set the current minute (0-59).
See Code Examples for other Android TimePicker Methods: