Open HiGitHubWorld opened 5 years ago
<com.haibin.calendarview.CalendarLayout android:id="@+id/calendarLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" app:calendar_show_mode="both_month_week_view" app:default_status="shrink" app:calendar_content_view_id="@+id/nsb_content">
<com.haibin.calendarview.CalendarView android:id="@+id/calendarView" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="#fff" app:calendar_padding="10dp" app:current_month_lunar_text_color="#CFCFCF" app:current_month_text_color="#333333" app:max_year="2020" app:min_year="2004" app:month_view_show_mode="mode_fix" app:other_month_lunar_text_color="#e1e1e1" app:other_month_text_color="#e1e1e1" app:scheme_text="假" app:scheme_text_color="#333" app:scheme_theme_color="#128c4b" app:selected_lunar_text_color="#fff" app:selected_text_color="#fff" app:selected_theme_color="#046cea" app:week_background="#fff" app:week_start_with="sun" app:week_text_color="#e1e1e1" app:year_view_day_text_color="#333333" app:year_view_day_text_size="7sp" app:year_view_month_text_color="#ff0000" app:year_view_month_text_size="20sp" app:year_view_scheme_color="#f17706" app:year_view_select_text_color="#fff" app:year_view_week_height="12dp" app:year_view_week_text_color="#e1e1e1" app:year_view_week_text_size="6sp" app:month_view="com.tjbhne.ysapp.function.playback.CustomMonthView" app:week_bar_view="com.tjbhne.ysapp.function.playback.CustomWeekBar" app:week_view="com.tjbhne.ysapp.function.playback.CustomYearView" app:year_view="com.tjbhne.ysapp.function.playback.CustomYearView" /> <android.support.v4.widget.NestedScrollView android:background="#fff" android:id="@+id/nsb_content" android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="aaa" /> </LinearLayout> </android.support.v4.widget.NestedScrollView> </com.haibin.calendarview.CalendarLayout>
@huanghaibin-dev 用你demo跑没有问题!可是我弄到自己项目里面就是这样! 这些类,也显示没有使用
你的"week_view"设置的是"CustomYearView",收缩后显示的是周视图,但是你的周视图设置的是年视图忙当然不行啦
<com.haibin.calendarview.CalendarLayout android:id="@+id/calendarLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" app:calendar_show_mode="both_month_week_view" app:default_status="shrink" app:calendar_content_view_id="@+id/nsb_content">