Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

从竖屏切换到横屏时 日历圆球背景出现剃头和剪尾的情况 #5

Closed
yaoxin2017 opened this issue Apr 3, 2017 · 3 comments

Comments

@yaoxin2017
Copy link

从竖屏切换到横屏时 日历圆球背景出现剃头和剪尾的情况
我有一个activity,配置(android:configChanges="keyboardHidden|orientation|screenSize")当横竖屏切换时,不销毁重建activity,在这个activity中我使用一个fragment,这个fragment内使用了你的日历控件,竖屏的时候一切都很好,但横屏就会发生剃头和剪尾的情况。

@yaoxin2017
Copy link
Author

我自己解决了,楼主下个版本自己更新下吧:
在CellView类中onDraw方法里大概80行改为:

if (isSelectedDay) {
//解决横竖屏剪头去尾的bug
canvas.drawCircle(width / 2, height / 2, Math.min(height / 2,width/2), mSelectedPaint);
}

@huanghaibin-dev
Copy link
Owner

@yaoxin2017 哈哈哈,感谢你的反馈,我会改进这里,没有考虑横屏的情况,接下来主要是节假日和你的这个建议

@huanghaibin-dev
Copy link
Owner

全新版本已经开源,可以任意自定义UI了,谢谢支持。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants