Link to home
Start Free TrialLog in
Avatar of perfectobject
perfectobject

asked on

Calendar Java/Android

Hello Experts,

I am implementing Calendar application in Java/Android.....i can able to generate the current month details,but when user clicks next month or previous month how to populate the dates.

Actually for current month i am taking(DayOfMonth and NoOfDays In Month),using these details i am populating the Grid Layout.....when user clicks next month or previous month...i want to populate that month details..!!

Can any body give the idea..??
device.png
ASKER CERTIFIED SOLUTION
Avatar of ksivananth
ksivananth
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of perfectobject
perfectobject

ASKER

Hi ksivananth,

Thanks for your comment.......how to determine the day of 1st date for particular month..!!
ThanQ..!!
         cal = Calendar.getInstance();
          cal.setTime(date); //date -- your date instance
          cal.set(Calendar.DAY_OF_MONTH, 1);
          int weekday = cal.get(Calendar.DAY_OF_WEEK);