I have a ListView where each ListItem has a TextView and RatingBar. Initially the RatingBar is set to invisible. During this time the onItemClickListener fires properly. However, when I set the RatingBar's visibility to VISIBLE, the onItemClickListener never fires. I've seen people with similar problems with checkboxes that were able to fix their issue by adding:
android:focusable="false"
However this doesn't seem to be working for the RatingBar. Below is the xml used for the cell:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/ratingcelllinear" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:orientation="vertical"
android:background="@drawable/cell_bg" android:paddingLeft="10dp"
android:paddingBottom="3dp" android:paddingTop="3dp" android:focusable="false">
<TextView android:id="@+id/ratingcelltitle" android:text="1. First Place"
android:layout_height="wrap_content" android:textColor="#FFFFFF"
android:layout_width="wrap_content" android:ellipsize="end"
android:singleLine="true" android:textSize="22dp" android:focusable="false" />
<RatingBar android:layout_width="wrap_content"
android:layout_height="wrap_content" style="@style/AggievilleRatingBar"
android:numStars="5" android:id="@+id/ratingcellrating"
android:layout_weight="0" android:focusable="false" android:focusableInTouchMode="false" android:clickable="false"/>
</LinearLayout>
I swear I'll work hours and as soon as I post I figure the problem.
android:isIndicator="true"
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