huanghaibin-dev / CalendarView

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

how to change the colour of progress bar on progress bar calendar style ... colour change for all monthofday #522

Open NaveenCrownStack opened 5 years ago

NaveenCrownStack commented 5 years ago

I want to change the color of all date of progress bar .. as I have seen only one color have the option to change I want a different color on a different day. Is that possible please help

NaveenCrownStack commented 5 years ago

map[getSchemeCalendar(year, month, 27, -0xec5310, "95").toString()] = getSchemeCalendar(year, month, 27, -0xec5310, "95") mCalendarView.setSchemeDate(map)

this method not set color as scheme ....

huanghaibin-dev commented 5 years ago

look at your MonthView or WeekView onDrawScheme, mSchemePaint.setColor from scheme.getColor()

NaveenCrownStack commented 5 years ago

where we get the scheme.getcolor()

mProgressPaint.setAntiAlias(false);
    mProgressPaint.setStyle(Paint.Style.STROKE);
    mProgressPaint.setStrokeWidth(dipToPx(context, 3.2f));

this is progress bar code i want to set the colorscheme on this progress...

RectF progressRectF = new RectF(cx - mRadius, cy - mRadius, cx + mRadius, cy + mRadius); canvas.drawArc(progressRectF, -90, angle, false, mProgressPaint); <<<<---- here this mProgresspaint parementer passed but when i passed mSchemePaint instead of mProgressPaint then colorSchema worked but not in progress bar way .. i will show on attachemen Screenshot_1565005619

NaveenCrownStack commented 5 years ago

Hee Thank you so much now it's working i set mProgresspaint object to the schema like mSchemePaint.set(mProgressPaint); then its working ... thankqqq

NaveenCrownStack commented 5 years ago

Hee I need to one more favor of your can i change the color on mNoneProgressPaint according to the schema as mProgressPaint i that possible