huanghaibin-dev / CalendarView

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

使用滑动布局添加绑定布局默认为月视图会导致日历下布局顶出屏幕收缩后显示正常 #676

Open sweet-guy opened 4 years ago

sweet-guy commented 4 years ago

问题布局:(希望大佬帮忙看一下) <com.haibin.calendarview.CalendarLayout android:id="@+id/calendar_parent" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" app:default_status="expand" app:calendar_show_mode="only_month_view" android:layout_below="@+id/title_date_text" app:calendar_content_view_id="@+id/bottom_expand"

<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:month_view="com.haibin.calendarview.SimpleMonthView" app:calendar_height="40dp" app:current_month_text_color="#333333" app:min_year="2004" app:other_month_text_color="#e1e1e1" app:scheme_text="假" app:scheme_text_color="#333" app:scheme_theme_color="#333" app:selected_text_color="#fff" app:selected_theme_color="#00ACFF" app:week_background="#fff" app:week_text_size="13sp" app:week_view="com.haibin.calendarview.SimpleWeekView" app:year_view_day_text_color="#333333" app:year_view_day_text_size="9sp" app:year_view_month_text_size="20sp" app:current_day_text_color="#333333"

</com.haibin.calendarview.CalendarView> <FrameLayout android:id="@+id/bottom_expand" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#FAFAFA" android:layout_marginBottom="49dp" android:layout_below="@+id/calendar_parent"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/moth_calendar_data" android:layout_below="@+id/rv_expend" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="20dp" android:minHeight="600dp" android:background="#FAFAFA"></androidx.recyclerview.widget.RecyclerView>

<RelativeLayout
    android:id="@+id/rv_expend"
    android:layout_width="match_parent"
    android:layout_height="20dp"
    android:layout_below="@+id/calendar_parent"
    android:background="#ffffff">
    <ImageView
        android:id="@+id/calendar_select"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@mipmap/open"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        ></ImageView>
</RelativeLayout>

</com.haibin.calendarview.CalendarLayout>
wqbs369 commented 4 years ago

我也是这样子的,你给recyclewView设置个background=white试试,我是这样弄好的

sweet-guy commented 4 years ago

这个应该和颜色没关系,我上边布局是加颜色的,现在是部分机型会出现recycleview顶出屏幕看不到数据