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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ThanQ..!!
cal = Calendar.getInstance();
cal.setTime(date); //date -- your date instance
cal.set(Calendar.DAY_OF_MO NTH, 1);
int weekday = cal.get(Calendar.DAY_OF_WE EK);
cal.setTime(date); //date -- your date instance
cal.set(Calendar.DAY_OF_MO
int weekday = cal.get(Calendar.DAY_OF_WE
ASKER
Thanks for your comment.......how to determine the day of 1st date for particular month..!!