We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
No description provided.
The text was updated successfully, but these errors were encountered:
当高度为70dp, cornerRadius为30dp,就会导致背景是一个圆
Sorry, something went wrong.
如果四周的圆角都差不多一致的话可以考虑下这个方法: 在源代码的shapeutils 里添加
fun roundedRect2( left: Float, top: Float, right: Float, bottom: Float, tl: Float, tr: Float, br: Float, bl: Float): Path { var tl = tl var tr = tr var br = br var bl = bl val path = Path() if (tl < 0) tl = 0f if (tr < 0) tr = 0f if (br < 0) br = 0f if (bl < 0) bl = 0f var roundRect = RectF(left, top, right, bottom) path.addRoundRect(roundRect,floatArrayOf(tl,tl,tr,tr,br,br,bl,bl), Path.Direction.CW) return path }
在主源代码的shadowview 的onDraw方法里的ShapeUtils.roundedRect 更改为ShapeUtils.roundedRect2
原先的rect只要是cornerradius达到了高度的一半就会变成圆,而且原先的绘制方式达不到左右俩边是完整半圆的情况
这个方式只适用于四周圆角值一致的情况,其他的一些情况的话可能会导致一些不一样的问题发生,可以考虑引入
No branches or pull requests
No description provided.
The text was updated successfully, but these errors were encountered: