open date picker on button click event
btn.setOnClickListener(new OnClickListener() { @TargetApi(Build.VERSION_CODES.HONEYCOMB) @Override public void onClick(View v) { // TODO Auto-generated method stub final Calendar c = Calendar.getInstance(); int mYear = c.get(Calendar.YEAR); int mMonth = c.get(Calendar.MONTH); int mDay = c.get(Calendar.DAY_OF_MONTH); // Launch Date Picker Dialog DatePickerDialog dpd = new DatePickerDialog( SurveyMain.this, new DatePickerDialog.OnDateSetListener() { @TargetApi(Build.VERSION_CODES.HONEYCOMB) @Override public void onDateSet( DatePicker view, int year, int monthOfYear, int dayOfMonth) { GregorianCalendar gc = new GregorianCalendar(); gc.add(Calendar.DATE, 1); datetomoroow = gc.getTime(); c.set(Calendar.YEAR, year); c.set(Calendar.MONTH, ...