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

关于ShapeBuilder类配置常量优化的建议 #174

Closed
magic0908 opened this issue Apr 21, 2020 · 1 comment
Closed

关于ShapeBuilder类配置常量优化的建议 #174

magic0908 opened this issue Apr 21, 2020 · 1 comment

Comments

@magic0908
Copy link

感谢作者的开源库,不过我觉得有些地方的代码可以优化下。
ShapeBuilder里面的常量都是普通Int类型,比如定义android:shape,
代码setShapeType(shapeType: Int),因为参数是Int类型,有可能添加参数的时候会写成其他常量。就会引发问题。我觉得可以参考ViewCompat类,使用注解定义这些常量,将其分组,这样在使用的时候更加直观。

@lygttpod
Copy link
Owner

非常感谢提的优化意见,为了不引入注解代码就把ShapeBuilder常量中使用枚举处理了,可以拉最新代码看下

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