Previously i used the ADT10.0 . In this version i am not getting any errors regarding styles. After i updated my ADT to 18.0. Now i got the following error.
error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget.RatingBar.Small'.
How can I solve this? I saw somewhere to solve this import the styles using http://source.android.com/source/downloading.html but it's not understandable please can any body help me?
<style name="reviewRatingBar1" parent="@android:style/Widget.RatingBar.Small" >
<item name="android:progressDrawable">@drawable/review_rating_bar_full</item>
<item name="android:minHeight">13dip</item>
<item name="android:maxHeight">13dip</item>
</style>
According to the android.R.style documentation there isn't a Widget.RatingBar.Small style (any longer), which appears to be the reason why Eclipse is giving you that error.
Comparing the styles.xml files from e.g. API level 7 and 15 it appears that the style isn't public anymore. If I try to reference it in Eclipse, I actually get an error message that confirms this
Error: Resource is not public. (at 'style' with value '@android:style/Widget.RatingBar.Small').
As far as I can tell, there are several options you have here:
style="?android:attr/ratingBarStyleSmall" when you declare the RatingBar. You can, however, not inherit from this theme-based style, so any customizations to the default 'small' style will have to be copied over to all your other small rating bars.Widget.Holo.RatingBar.Small or Widget.Holo.Light.RatingBar.Small. You probably design your app against either one, so you'll know at design time which style to inherit from.RatingBar further down anyhow, so you may be able to get away with just inheriting from the regular RatingBar style?If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With