Code example for DatePicker

Methods: initsetCalendarViewShown

     * @return a DatePicker with the date set 
    protected View onCreateDialogView() {
        this.datePicker = new DatePicker(getContext());
        Calendar calendar = getDate();
        datePicker.init(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH),
                calendar.get(Calendar.DAY_OF_MONTH), this);
        } catch(NoSuchMethodError e){
            //handel ics 
        return datePicker;
     * Produces the date used for the date picker. If the user has not selected a 
     * date, produces the default from the XML's android:defaultValue. If the 
Stop searching for code, let great code find you!  Add Codota to your java IDE