문제

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