Multiple choice list with custom view?

后端 未结 9 770
失恋的感觉
失恋的感觉 2020-12-02 09:07

I\'ve seen example com.example.android.apis.view.List11 from ApiDemos. In that example, each row takes the view android.R.simple_list_item_multiple_

9条回答
  •  执笔经年
    2020-12-02 09:31

    Each such view has a TextView and a CheckBox.

    No, it doesn't. It has a CheckedTextView.

    So what do I need to do to make a multiple choice list with my custom view for each row?

    Try making the CheckBox android:id value be "@android:id/text1" and see if that helps. That is the ID used by Android for the CheckedTextView in simple_list_item_multiple_choice.

提交回复
热议问题