ListView の TableRow に RatingBar があるonListItemClick
場合、行に触れても発生しません。コントロールを実行するbar.setVisibility(View.GONE)
か、単に削除すると、行は再びクリック可能になります。
RatingBar を追加したときに、その行が引き続き発生するようにするにはどうすればよいonListItemClick
ですか? を設定してみましたfocusable="false"
が、それでもうまくいきません。
アイデア????
TableRow の RatingBar の XML は次のとおりです。
<TableRow
android:id="@+id/tableRow2x"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RatingBar
android:id="@+id/rtbProductRating"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:numStars="5"
android:rating="3.5"
android:layout_marginLeft="8dip"
android:layout_marginTop="3dp"
android:layout_marginBottom="3dp"
android:isIndicator="false"
android:focusable="false"
android:focusableInTouchMode="false"
style="@style/starRatingBar"
/>
</LinearLayout>
</TableRow>
そして、ここに私のコードがあります:
public class MainFragment extends ListFragment {
public void onListItemClick(ListView parent, View v, int position, long id)
{
//... does stuff
}