圆角半径可绘制形状
我在列表视图中动态创建一个可绘制形状,并使用这行代码设置角半径。
setCornerRadius(float radius)
我可以用 dp 值以某种方式指定它吗?
I'm dynamically creating a drawable shape in my list view and i'm setting the corner radius with this line of code.
setCornerRadius(float radius)
Am i able to specify this with a dp value somehow??
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您希望动态获取倾角值吗?这描述了它:
什么是从 Java 代码指定 DIP 尺寸的正确方法?
从那里复制:
You're looking to get dip values dynamically? This describes it:
What is the correct way to specify dimensions in DIP from Java code?
Copied from there: