I have a scenario that we should have a single choice mode radio button in listview. when i am click on the radiobutton it should go to enable state. when i am click on the whole item then it should redirect to the new activity. i refered below link
i can find out the way for multiple choice mode. but not for the single choice mode. Any Idea on this ?
???Edit???
How can i find the tag of the corresponding tag of an item in the listview
One way you can but I don’t know it’s perfect or not.
track the position id of the listview on which the radio button was checked now when you click on the another radio button then implement the
setOnCheckedChangeListener(listener)and check the position which was already check and uncheck that radiobutton.You can store the status of radio button into the custom model(Model which contains the controls like textview, imageview, radiobutton etc for listview single row) which was added into the listview
check this article for using model and handle the component into the listview in this given an example of checkbox
Update
I think you can get tag like this way
update 2
suppose this is your adapter and arraylist object
you Model class look like this
your viewholder
pass the listmodel to this CustomAdapter class in constructor
now in
getView()