开发者

Android Honeycomb CalendarView doesn't respect xml properties

I have the following code in my xml:

<CalendarView
    android:id="@+id/main_calendar"
    android:showWeekNumber="false"
    android:layout_width="700dp"
    android:layout_height="650dp"
    android:layout_gravity="center"
    android:selectedWeekBackgroundColor="@color/black_shadow"
/>

The width and height are respected, but 开发者_如何转开发showWeekNumber and selectedWeekBackgroundColor are not. It still shows the week number and the selected week is still the default blue color.


Looks like this control is broken.


Also worth noting: you must explicitly provide the layout_width and layout_height (not match_parent / fill_parent / wrap_content). I covered it here: Android 3.0 CalendarView

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜