MagicMashRoom / SuperCalendar

@Deprecated android 自定义日历控件 支持左右无限滑动 周月切换 标记日期显示 自定义显示效果跳转到指定日期
2.76k stars 484 forks source link

recycleview 把日历覆盖了一些 #22

Closed wlianghe00 closed 7 years ago

wlianghe00 commented 7 years ago

image 这个是什么原因啊

MagicMashRoom commented 7 years ago

recyclerView 设置成matchparent readme里有指出

wlianghe00 commented 7 years ago

@MagicMashRoom 是match_parent啊 <android.support.design.widget.CoordinatorLayout android:id="@+id/content" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1">

            <com.isat.ehealth.ui.widget.calendar.view.MonthPager
                android:id="@+id/calendar_view"
                android:layout_width="match_parent"
                android:layout_height="270dp"
                android:background="#fff" />

            <android.support.v7.widget.RecyclerView
                android:id="@+id/recycler"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="#ffffff"
                app:layout_behavior="com.isat.ehealth.ui.widget.calendar.behavior.RecyclerViewBehavior"
                android:layout_gravity="bottom"
                android:clipToPadding="false"
                android:clipChildren="false"
                android:layout_marginBottom="45dp"/>
            <!-- paddingBottom或者magin距离必须是MonthPager高度的1/6-->
            <!-- RecyclerView的高度必须是MatchParent-->
            <!-- RecyclerView的background必须是非透明-->
        </android.support.design.widget.CoordinatorLayout>
MagicMashRoom commented 7 years ago

那recyclerView得高度为什么只有wrapcontent那么高? 你把CoordinatorLayout的layout_weight属性取消掉 你运行我的DEMO时会出现这种情况吗?

MagicMashRoom commented 7 years ago

或者你给recyclerView设置一个固定的高度尝试一下是什么问题

MagicMashRoom commented 7 years ago

这个应该不是日历控件的内部问题 就是recyclerView高度的问题 必须使recyclerView 设置成matchparent 才能遮住后面的日历

wlianghe00 commented 7 years ago

image 你的demo是好的。。。。。刚刚是父布局没有设置match_parent,现在改成match_parent 就全部遮挡了

MagicMashRoom commented 7 years ago

那你按我的DEMO来 DEMO怎么写 你就怎么写 你怎么问我我也不知道你什么问题 你这样描述问题我没有办法分析 先自己看代码解决

wlianghe00 commented 7 years ago

image

你的demo把这里屏蔽就会出现这个问题,这2个textview怎么会有影响呢?