ListViewにRatingBarを配置したときにはまったのでメモ。
リストの行ごとのレイアウトに、以下のように追加する。
row.xml
<LinearLayout
android:descendantFocusability="blocksDescendants"
これで、RatingBarの方のイベントと、ListViewのonListItemClickイベントがどちらも取れるようになる。
More than 5 years have passed since last update.
ListViewにRatingBarを配置したときにはまったのでメモ。
リストの行ごとのレイアウトに、以下のように追加する。
<LinearLayout
android:descendantFocusability="blocksDescendants"
これで、RatingBarの方のイベントと、ListViewのonListItemClickイベントがどちらも取れるようになる。
Register as a new user and use Qiita more conveniently