我的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"
/>
尊重宽度和高度,但不是showWeekNumber和selectedWeekBackgroundColor。它仍然显示周数,所选周仍然是默认的蓝色。
答案 0 :(得分:1)
看起来此控件已损坏。
答案 1 :(得分:1)
另外值得注意的是:您必须明确提供layout_width和layout_height(而不是match_parent / fill_parent / wrap_content)。我在这里介绍它: Android 3.0 CalendarView