【发布时间】:2011-05-03 02:29:52
【问题描述】:
我正在构建一个自定义评分栏。在 kozyr 的文章的帮助下,我创建了它。 但是我对不同屏幕类型的不同图像缩放大小有疑问。 下面我在左侧提供了我的自定义评分栏的屏幕截图,在右侧提供了简单的 imageview。 这是用于 HVGA 屏幕的。
如您所见,评分栏和图像视图中的星星是相同的
还有这张来自 HVGA 屏幕的截图
another link to the screenshot
Android 以某种方式调整了我的评分栏中的星星大小。什么问题?!!
这里是代码
<RatingBar android:id="@+id/rating_lunch" style="@style/starRatingBar" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:numStars="5" android:stepSize="1.0"/>
风格如下:
<style name="starRatingBar" parent="@android:style/Widget.RatingBar">
<item name="android:progressDrawable">@drawable/progress_star_big</item>
<item name="android:minHeight">19px</item>
<item name="android:maxHeight">19px</item>
</style>
【问题讨论】:
标签: android