Code example for DatePicker

Methods: clearFocusgetDayOfMonthgetMonthgetYear

   * and {@link #onDialogClosed(boolean)}. Be sure to call the super when overriding. 
  public void onClick(DialogInterface dialog, int which) {
    super.onClick(dialog, which);
    onDateChanged(datePicker, datePicker.getYear(), datePicker.getMonth(),
    onDialogClosed(which == DialogInterface.BUTTON1); // OK?
   * Produces the date the user has selected for the given preference, as a 
   * calendar. 
   * @param preferences 
   *          the SharedPreferences to get the date from 
   * @param field 
   *          the name of the preference to get the date from 
   * @return a Calendar that the user has selected 
Stop searching for code, let great code find you!  Add Codota to your java IDE