DATE PICKER:
DatePicker dp=new DatePicker (MainActivity.this);ln.addView(dp);Calendar
calendar=Calendar.getInstance(); dp.init(calendar.get(Calendar.YEAR),
calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH),new
DatePicker.OnDateChangedListener(){@Override public void onDateChanged(DatePicker
datePicker, int i, int i1, int i2)
{Toast.makeText(getApplicationContext(),datePicker.getDayOfMonth() + "-"
+datePicker.getMonth() + "-"+datePicker.getYear(),Toast.LENGTH_SHORT).show(); }});
0 Comments: