In my sample project i have to implement next week Monday to sunday in a text view (like 6 May >> 12 My). on click of next button it must show next week start date and end date (like 13 May >> 19 May). I have implemented the intial week view with the following code
Calendar c = Calendar.getInstance();
c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
SimpleDateFormat df = new SimpleDateFormat("dd MMMM");
String printDate = df.format(c.getTime());
//gestureEvent.setText(reportDate);
c.add(Calendar.DAY_OF_WEEK, 6);
String printDate2 = df2.format(c.getTime());
gestureEvent.setText(reportDate +" >> "+reportDate2);
on click of next week button i have done this but it static it was just an attempt attempt :)
onclick will call this function goNextWeek()
public void goNextWeek()
{
Calendar c = Calendar.getInstance();
c.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
c.add(Calendar.DAY_OF_WEEK, 6);
System.out.println("End Date : " + c.getTime());
SimpleDateFormat df = new SimpleDateFormat("dd MMMM");
String reportDate = df.format(c.getTime());
gestureEvent.setText(reportDate);
c.add(Calendar.DAY_OF_WEEK, dates);
c.add(Calendar.DAY_OF_WEEK, 1);
System.out.println("End Date asdfadf: " + c.getTime());
}
please tell me how to show next week start and end date?