0

I want to use LWUIT 1.5 Calendar class to show different background color to certain days to show that those dates have some event scheduled. I tried overriding the createDay() method of the Calendar class but it does not work. What am I doing wrong in this? What do i write so that the createDay() method below applies the bgColor correctly?

I also want to add Command to those Buttons to take the user to event details screen. Can I just add commandListener to the Button?

Calendar calendar = new Calendar() {

        protected Button createDay() {
            Button day = new Button();
            day.getStyle().setBgColor(0xff0000);
            day.setAlignment(LEFT);
            day.setUIID("CalendarDay");
            day.setEndsWith3Points(false);
            day.setTickerEnabled(false);
            return day;
        }
    };
Mun0n
  • 4,438
  • 4
  • 28
  • 46
Kiran Aghor
  • 457
  • 5
  • 8

1 Answers1

1

There are so many UIID related to the Calendar days. They are CalendarDay CalendarNavigation CalendarSelectedDay. Try to configurate this UIIDs' (Unselected, Selected, Pressed and Disabled) styles when you build your theme.

Mun0n
  • 4,438
  • 4
  • 28
  • 46
  • I want to apply theme to only those days for which an event is available. E.g. on Mach 16th, there is a soccer game in my town so that day of the month will be shown with red bg. – Kiran Aghor Mar 13 '12 at 19:56
  • ok, so when you have a marked day, put to it another UIID and build another style in the Resource editor – Mun0n Mar 13 '12 at 22:28