Code example for DatePickerDialog

Methods: show

0
 
	private void initEdtDOB(){ 
		mEdtDOB.setOnTouchListener(new OnTouchListener() {
			@Override 
			public boolean onTouch(View v, MotionEvent event) {
				mDatePickerDialog.show();
				return true; 
			} 
		}); 
 
		mEdtDOB.setOnFocusChangeListener(new OnFocusChangeListener() {
 
			@Override 
			public void onFocusChange(View v, boolean hasFocus) {
				if (hasFocus) {
					mDatePickerDialog.show();
				} else { 
					mDatePickerDialog.dismiss();
				} 
			} 
		});