[英]ShapeDrawable as progressDrawable for RatingBar in Android?
[英]RatingBar cuts off progressDrawable
RatingBar
剪切了我的progressDrawable
,无论我如何设置它的高度( wrap_content
,精确Drawable
的高度都不起作用)。 看来,RatingBar不适用于非正方形图像。 任何想法如何避免剪裁? 图片确实有一些透明的填充,其大小在屏幕截图中带有蓝色边框。
<RatingBar android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:numStars="1"
android:progressDrawable="@drawable/selector_person_bar"
android:rating="0"
android:stepSize="1"/>
知道了,由于ProgressBar
的实现存在错误 ,必须设置android:maxHeight
以避免裁剪。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.