android listactivity onCheckedChangeListener

前端 未结 2 481
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-28 20:11

I\'m developing an app and I have one ListActivity, which has choice mode set to choice_mode_multiple. now i want to override method, which is called w

2条回答
  •  后悔当初
    2021-01-28 20:19

    Use isItemChecked (int position) or setItemChecked(int position, boolean value) if you using standart array adapter and SINGLE or MULTIPLE choise mode. http://developer.android.com/reference/android/widget/AbsListView.html#isItemChecked(int)

    Also you can create your custom adapter and inflate row layout with checkbox that can hold onClickListener and CheckedChangedListener. Use search to find example.

提交回复
热议问题