i'm developing android app which requires calender with Only 7 days from current date : if Today is Wed day, so results will be wed -- till tuesday i need to show in view of my calender.
Calendar instance = Calendar.getInstance();
widget.setSelectedDate(instance.getTime());
Calendar instance1 = Calendar.getInstance();
instance1.set(instance1.get(Calendar.YEAR), Calendar.JANUARY, 1);
Calendar instance2 = Calendar.getInstance();
instance2.set(instance2.get(Calendar.YEAR), Calendar.DECEMBER, 31);
widget.state().edit()
.setMinimumDate(instance1.getTime())
.setMaximumDate(instance2.getTime())
.commit();
widget.addDecorators(
new MySelectorDecorator(this),
new HighlightWeekendsDecorator(),
oneDayDecorator);