android - How to implement RecycerView With Items having Radio buttons with single choice mode -
i need show recyclerview single choice item. recyclerview doesn't have choice mode.
does 1 know how resolve this?
thanks in advance.
store states
of checked items in sparsebooleanarray
position key.as change state
of button
,update it's status in booleanarray
, call notifyitemchanged(position)
.and in bindviewholder(viewholder viewholder,int position)
method load state booleanarray
viewholder.radiobutton.setchecked(boolean.get(position))
.have @ this basic idea
Comments
Post a Comment