0

When I will click a specific date from date picker Calendar then a page will be displayed. How it will be possible?

Thanks in advance

1 Answers1

0

You start your dialog or whatever with your date picker. The XML for implementing a datepicker will look something like this:

<DatePicker
    android:id="@+id/datePicker1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" >
</DatePicker>

You wait until the user has finished and then you go and get your calendar value from your date picker by using something like

DatePicker d = (DatePicker) dialog.findViewById(R.id.datePicker1);
Calendar cal = Calendar.getInstance();
cal.set(d.getYear(), d.getMonth(), d.getDayOfMonth());

You present that calendar value to the activity which displays your page and in that activity you go and find out what exactly you wish to display for that specific date.

SvenT23
  • 667
  • 6
  • 19
  • @SaifaLiza If the answer helped, please "accept" it by clicking the check mark :) This gives the asker and the answerer some reputation and helps other users who might have the same issue. – SvenT23 May 05 '14 at 13:53
  • To the left of my answer you see a "0" with both an arrow upwards and downwards. Right beneath that there's a checkmark. If you click that you accept that answer. Welcome to stackoverflow :) – SvenT23 May 06 '14 at 07:11