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

设置Margin属性后 圆角错位。 #6

Open
ChuckZhou opened this issue Apr 16, 2019 · 2 comments
Open

设置Margin属性后 圆角错位。 #6

ChuckZhou opened this issue Apr 16, 2019 · 2 comments

Comments

@ChuckZhou
Copy link

xml 布局中设置margin时如果4个方向margin不一致会出现圆角错位的问题。有时间的话 麻烦优化下,3Q。

@ai2101039
Copy link
Owner

收到,感谢您的反馈,我修改一下。还请留意!万分感谢。

ai2101039 pushed a commit that referenced this issue Apr 23, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@ai2101039
Copy link
Owner

您好,老铁,跟您说下你的情况。
1.当你设置 matgin后,会有可能导致控件不是正方形。所以画圆就会出现问题。
2.你可以打开 “开发者选项” -- “显示布局边界”

我建议你调整一下控件,使其成为正方形。
如果一定要是长方形的话,那么就得需要在 onDraw里面对 宽高进行判断。

下面是我的图:

https://github.com/ai2101039/YLCircleImageView/blob/master/screenshots/issues-%236.png

PNG

ai2101039 pushed a commit that referenced this issue Apr 28, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
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