use of com.prolificinteractive.materialcalendarview.sample.decorators.HighlightWeekendsDecorator in project material-calendarview by prolificinteractive.
the class BasicActivityDecorated method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_basic);
ButterKnife.bind(this);
widget.setOnDateChangedListener(this);
widget.setShowOtherDates(MaterialCalendarView.SHOW_ALL);
final LocalDate instance = LocalDate.now();
widget.setSelectedDate(instance);
final LocalDate min = LocalDate.of(instance.getYear(), Month.JANUARY, 1);
final LocalDate max = LocalDate.of(instance.getYear(), Month.DECEMBER, 31);
widget.state().edit().setMinimumDate(min).setMaximumDate(max).commit();
widget.addDecorators(new MySelectorDecorator(this), new HighlightWeekendsDecorator(), oneDayDecorator);
new ApiSimulator().executeOnExecutor(Executors.newSingleThreadExecutor());
}
use of com.prolificinteractive.materialcalendarview.sample.decorators.HighlightWeekendsDecorator in project material-calendarview by prolificinteractive.
the class SwappableBasicActivityDecorated method onCreate.
@Override
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_basic_modes);
ButterKnife.bind(this);
widget.setOnDateChangedListener(this);
widget.setShowOtherDates(MaterialCalendarView.SHOW_ALL);
final LocalDate instance = LocalDate.now();
widget.setSelectedDate(instance);
final LocalDate min = LocalDate.of(instance.getYear(), Month.JANUARY, 1);
final LocalDate max = LocalDate.of(instance.getYear(), Month.DECEMBER, 31);
widget.state().edit().setMinimumDate(min).setMaximumDate(max).commit();
widget.addDecorators(new MySelectorDecorator(this), new HighlightWeekendsDecorator(), oneDayDecorator);
}
Aggregations