huanghaibin-dev / CalendarView

Android上一个优雅、万能自定义UI、仿iOS、自定义动画,支持垂直、水平方向切换、支持周视图、自定义周起始、性能高效的日历控件,支持热插拔实现的UI定制!支持标记、自定义颜色、农历、自定义月视图各种显示模式等。Canvas绘制,速度快、占用内存低,你真的想不到日历居然还可以如此优雅!An elegant, highly customized and high-performance Calendar Widget on Android.
Apache License 2.0
9.11k stars 1.79k forks source link

收缩后,显示空白!展开是正常 #402

Open HiGitHubWorld opened 5 years ago

HiGitHubWorld commented 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> 

7aa3d8584d8cb60fa7805a2e8298a12 5b23acc7014990136ea95bb1afbc57a

HiGitHubWorld commented 5 years ago

@huanghaibin-dev 用你demo跑没有问题!可是我弄到自己项目里面就是这样! 1552565601(1) 这些类,也显示没有使用

Weiyi-C commented 5 years ago

@huanghaibin-dev 用你demo跑没有问题!可是我弄到自己项目里面就是这样! 1552565601(1) 这些类,也显示没有使用

你的"week_view"设置的是"CustomYearView",收缩后显示的是周视图,但是你的周视图设置的是年视图忙当然不行啦