jeudi 24 août 2017

How to know what item is selected ina recyclerview via checkbox?

i have a question related to recyclerview and i would like to know how can i recognize what element is selected from a recyclerview whose items has a checkbox each one.

I am using clean architecture and one of my layouts has an spinner where i can select a city and i make an http post request and the response are all the offices in this city. i take all this offices and insert in my layout but all this items has a check box each one and i have to recognize which office i selected and i only can choose one of them.

How can i recognize wich item is selected and how can i make to force user to only select one of them?




Aucun commentaire:

Enregistrer un commentaire