简体   繁体   English

获取视图的角半径值

[英]Get corner radius value of a view

How do I retrieve the corner radius value of a view ( a cardview for example ) programmatically ? 如何以编程方式检索视图的角半径值(例如cardview)? I am going to use that value in a transition animation 我将在过渡动画中使用该值

CardView cardView = (CardView)findViewById(R.id.your_id);
.
.
float radius = cardView.getRadius();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM