4

Helo,

I've created a custom ratingbar by using to following tutorial: http://kozyr.zydako.net/2010/05/23/pretty-ratingbar/

But now i want to resize my custom rating stars to smaller stars..

i got:

        <style name="orangeRatingBar" parent="@android:style/Widget.RatingBar">
           <item name="android:progressDrawable">@drawable/orange_ratingbar</item>
           <item name="android:minHeight">14dip</item>
           <item name="android:maxHeight">14dip</item>
        </style>

When i set the minHeight and the maxHeight i see only part of the stars.. The star image is 14px height and 14 width. Why do i only see a part of the image when i set the minheight 14px or 14dip.. When i set it on 19dip i see the whole star..

How can i create smaller stars (the size of default small ratingBar)?

4

2 回答 2

2

对于您的评分栏中的自定义星大小,请在 XML 中使用此标记-

对于小-style="?android:attr/ratingBarStyleSmall"

对于大style="?android:attr/ratingBarStyle"

对于中style="?android:attr/ratingBarStyleIndicator"

于 2014-12-30T09:25:33.557 回答
0

我以前遇到过这个

<uses-sdk android:minSdkVersion="4"
  android:targetSdkVersion="7"   />

您可能会在此处找到更多信息 Android 自定义评分栏图像大小问题

于 2012-05-17T18:42:29.537 回答