سؤال

I use custom RatingBar style in ListView row element, but it cause some strange problem. I have got custom style like this:

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

And I use this in my RatingBar in xml (in layout of listView row):

style="@style/CourseRatingBar"

But then the ListView onItemClickListener just doesn't work. When I click on element, there is no action.

When I use this as my RatingBar style:

style="?android:attr/ratingBarStyleSmall" 

everything (onItemClickListener ;-)) works fine.

The ListView use BaseAdapter with Holder pattern, with RatingBar, TextView and ImageView.

هل كانت مفيدة؟

المحلول

From my expirience- if this don't work, try to customize your rating bar How to create Custom Ratings bar in Android

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top