mCalendarView icon indicating copy to clipboard operation
mCalendarView copied to clipboard

How to set ExpCalendarView default to ShrinkView

Open htooaunghlaing opened this issue 9 years ago • 2 comments

Hi Developer,

How can I set 1.ExpCalendarView default to ShrinkView ( WeekView ) 2.Set DateCellView background to custom drawable or any color. 3.Set MinDate or Max Date. (Disable previous days to select). Can you please advise. Thanks.

htooaunghlaing avatar Oct 28 '16 04:10 htooaunghlaing

To get ShrinkView as default, it is OK with this,

CellConfig.Month2WeekPos = CellConfig.middlePosition; CellConfig.ifMonth = false; expandIV.setImageResource(R.mipmap.icon_arrow_down); expCalendarView.shrink();

htooaunghlaing avatar Oct 28 '16 05:10 htooaunghlaing

Hello,

For the second question.

DateCellView is just extend the LinearLayout, so you can set its background or backgroundcolor easily.

and the third.

You can detect it when you click the date, for example: In the class: CalendarExpAdapter.class

((BaseCellView) ret).setDate(dayData.getDate()); if (OnDateClickListener.instance != null) { ((BaseCellView) ret).setOnDateClickListener(OnDateClickListener.instance); }

you can compare the dayData.getDate() with your minDate or MaxDate, then decide if the ret need the OnDateClickListener

Hope these above can help you .

mBigFlower avatar Nov 02 '16 09:11 mBigFlower