为什么我的代码不能在我的calendarView android上显示任何颜色

时间:2017-09-24 10:22:33

标签: android app-inventor

当我运行我的代码时,请显示标准的CalendarView,没有任何颜色。

ViewGroup vg =(ViewGroup)inputHV.getView();

simpleCalendarView = new CalendarView(context);

    simpleCalendarView.setFocusedMonthDateColor(11277846); // set the red color for the dates of  focused month
    simpleCalendarView.setUnfocusedMonthDateColor(Color.BLUE); // set the yellow color for the dates of an unfocused month
    simpleCalendarView.setSelectedWeekBackgroundColor(11277846); // red color for the selected week's background
    simpleCalendarView.setWeekSeparatorLineColor(Color.GREEN);
    simpleCalendarView.setShowWeekNumber(true);


    vg.addView(simpleCalendarView);

0 个答案:

没有答案