Code example for DatePicker

Methods: updateDate

     * Sets the current date. 
     * @param year The date year. 
     * @param monthOfYear The date month. 
     * @param dayOfMonth The date day of month. 
    public void updateDateTime(int year, int monthOfYear, int dayOfMonth,
            int hourOfDay, int minutOfHour) {
        mDatePicker.updateDate(year, monthOfYear, dayOfMonth);
    public Bundle onSaveInstanceState() {
        Bundle state = super.onSaveInstanceState();
        state.putInt(YEAR, mDatePicker.getYear());
Stop searching for code, let great code find you!  Add Codota to your java IDE