简体   繁体   中英

Android ListView with custom row (RadioButton and 3 TextView)

i am using a listview in a class which extends ListActivity but my row have a radio button and 3 textviews.

If i delete radiobutton from it, the metod onListItemClick(ListView l, View v, int position, long id) works well and i see what item have been selected but with the radiobutton i can check what item have selected.

How i can resolve this? I am using a custom adapter for build listview

I think you need multi selection in the ListView that is why you're trying achieve that using RadioButton, if so, instead of RadioButton,try Checkbox, that would work great

and this tutorial will guide you how to accomplish that http://appfulcrum.com/2010/09/12/listview-example-3-simple-multiple-selection-checkboxes/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM