huanghaibin-dev / CalendarView

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

月视图隐藏下,依旧拦截左右滑动事件 #843

Open XIMOTIAN opened 6 days ago

XIMOTIAN commented 6 days ago

<com.haibin.calendarview.CalendarLayout android:id="@+id/cal_layout_home_base_calendar" android:layout_width="match_parent" android:layout_height="0dp" android:orientation="vertical" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toBottomOf="@id/calenderTopView" app:layout_constraintBottom_toBottomOf="parent" app:calendar_content_view_id="@+id/ll_home_base_calendar_content" app:calendar_show_mode="both_month_week_view" app:gesture_mode="disabled" app:default_status="shrink">

    <com.haibin.calendarview.CalendarView
        android:id="@+id/cal_view_home_base_calendar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/white"
        app:calendar_padding="10dp"
        app:current_day_lunar_text_color="#99A5A5A5"
        app:current_day_text_color="@color/black"
        app:current_month_lunar_text_color="#99A5A5A5"
        app:current_month_text_color="@color/black"
        app:day_text_size="@dimen/LargeTextSize"
        app:lunar_text_size="@dimen/MicroTextSize"
        app:month_view="cn.RoadshowMonthRectangleView"
        app:month_view_show_mode="mode_fix"
        app:other_month_lunar_text_color="#4c999999"
        app:other_month_text_color="#4c999999"
        app:scheme_theme_color="@color/dark_gray_1"
        app:select_mode="single_mode"
        app:selected_lunar_text_color="#99A5A5A5"
        app:selected_text_color="@color/orange_main"
        app:selected_theme_color="#FFF0E8"
        app:week_text_color="@color/dark_gray_1"
        app:week_text_size="@dimen/MicroTextSize"
        app:week_bar_height="28dp"
        app:week_view="cn.RoadshowWeekRectangleView" />

    <!--     <cn.comein.main.roadshow.calendar.CalendarLinearLayout
             android:id="@+id/calendar_linear_layout"
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="4dp"
             android:background="@color/light_grayish_cyan"
             android:orientation="vertical">

         </cn.comein.main.roadshow.calendar.CalendarLinearLayout>
 -->

    <LinearLayout
        android:id="@+id/ll_home_base_calendar_content"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

      <RecyclerView>
    </LinearLayout>
</com.haibin.calendarview.CalendarLayout>
XIMOTIAN commented 6 days ago

上面布局代码,月视图收缩,但是依旧是INvisible的,然后外层还有一个ViewPager,但是触摸月视图区域左右滑动,依旧是 无法让父容器的 ViewPager滑动,触摸事件被拦截了