Mohit sharma wrote:
> Hi ,
>
> I have 4 DatePicker Dialog in my Activity Class which are shown on
> click of 4 buttons . Now for these datePickerDialog i want to use same
> listener .
>
>         DatePickerDialog taxPickerDialog = new
> DatePickerDialog(getCurrentContext(),dateSetListener,calendar.get(Calendar.YEAR),
> calendar.get(Calendar.MONTH),calendar.get(Calendar.DATE));
>         taxPickerDialog.show();
>
>         DatePickerDialog fcPickerDialog = new
> DatePickerDialog(getCurrentContext(),dateSetListener,calendar.get(Calendar.YEAR),
> calendar.get(Calendar.MONTH),calendar.get(Calendar.DATE));
>         fcPickerDialog.show();
>         break;
>
>         DatePickerDialog expiryPickerDialog = new
> DatePickerDialog(getCurrentContext(),dateSetListener,calendar.get(Calendar.YEAR),
> calendar.get(Calendar.MONTH),calendar.get(Calendar.DATE));
>         expiryPickerDialog.show();
>
>
>         DatePickerDialog permitPickerDialog = new
> DatePickerDialog(getCurrentContext(),dateSetListener,calendar.get(Calendar.YEAR),
> calendar.get(Calendar.MONTH),calendar.get(Calendar.DATE));
>         permitPickerDialog.show();
>
> Now i want a use listener for all the 4 dialog but dnot know how to
> implement this ???
>
> DatePickerDialog.OnDateSetListener dateSetListener =new
> DatePickerDialog.OnDateSetListener() {
>
>     @Override
>     public void onDateSet(DatePicker view, int year, int month, int
> day) {
>     switch(????){????}
> }
> };

as you can see onDateSet method has DatePicker parameter which is
different for each DatePickerDialog

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to