Code example for DatePickerDialog

0
 
	@Override 
	protected Dialog onCreateDialog(int id) {
		switch (id) {
			case DATE_DIALOG_START_ID:
				return new DatePickerDialog(this, mStartDateSetListener, mStartYear, mStartMonth, mStartDay);
			case DATE_DIALOG_END_ID:
				return new DatePickerDialog(this, mEndDateSetListener, mEndYear, mEndMonth, mEndDay);
		} 
		return null; 
	} 
 
	private void setEventListeners() { 
		Button btnStartDate = (Button) findViewById(R.id.range_btn_startdate);
		btnStartDate.setOnClickListener(new OnClickListener() {
 
			public void onClick(View v) {
				showDialog(DATE_DIALOG_START_ID);
			} 
 
Connect your IDE to all the code out there  Get Codota for Java