开发者

Android Honeycomb CalendarView doesn't respect xml properties

开发者 https://www.devze.com 2023-04-01 12:13 出处:网络
I have the following code in my xml: <CalendarView android:id=\"@+id/main_calendar\" android:showWeekNumber=\"false\"

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

精彩评论

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