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

I need this example #813

Open ManoloLopera opened 1 year ago

ManoloLopera commented 1 year ago

Hello,

I try design this example in Android but I dont find that.

https://github.com/huanghaibin-dev/CalendarView/blob/master/app/src/main/assets/simple.jpg

Anyone can help me?

huanghaibin-dev commented 1 year ago

add this code in onDrawText func ` float baselineY = mTextBaseLine + y; int cx = x + mItemWidth / 2; int cy = y + mItemHeight / 2; int size = (int) (Math.min(mItemWidth, mItemHeight) / 10 * 8.5 / 2); canvas.drawRoundRect(cx - size, cy - size, cx + size, cy + size, mRadius, mRadius, isSelected ? mSelectedPaint : mCalendarPaint);

`

geeklx commented 8 months ago

不行啊 还是圆形 怎么设置圆角 求助