shichaohui / EasyCalendar

Quickly customize the calendar UI. You can use EasyCalendar to quickly get the calendar style UI.
598 stars 72 forks source link

Calendar height varies with month swipes #10

Open droidstered opened 6 years ago

droidstered commented 6 years ago

My calendar height is going to vary for different months while swipe.

For decemeber 2017 month the height is different. I have used following method to overcome with it but none of them are working for me.

   calendarView.setCanDrag(false);
   calendarView.setScaleEnable(true);
   calendarView.setShowOverflowDate(true);
   calendarView.setCanFling(false);

Also, I have applied divider between dates. It works well too but the one issue is there is no separator between week layout and calendar. Instead of separator is showing at bottom which no need.

Thanks.

shichaohui commented 6 years ago

If you want the height of the calendar to be the same,you should use calendarView.setScaleEnable(false);

droidstered commented 6 years ago

I have already used that. But the issue is that i am using this calendar in ScrollView and seems calendar height is now looking too much. So because of that my above fixed layout of 250dp height become small.

Also, I have applied divider between dates. It works well too but the one issue is there is no separator between week layout and calendar. Instead of separator is showing at bottom which no need.

shichaohui commented 6 years ago

The height of date is dynamic calculation by calendar's width.

You can set monthBackground to CanlendarView for resolve separator like activity_action

droidstered commented 6 years ago

Ok. Thanks. So calendar height will be dynamic as per month change?

shichaohui commented 6 years ago

You should set wrap_content to the height of CanlendarView. android:layout_height="wrap_content"

droidstered commented 6 years ago

I have already set height of CanlendarView to wrap_content