Disable all other toggle buttons in recycler view after one is clicked
I am using recyclerView to build a list of toggle buttons (like a numpad), I would like to achieve: when user 'turns on' a button by clicking it, 'turns off' all other buttons I have tried to add an onClickListener inside the view holder class, and call notifyDataSetChanged() such that onBindViewHolder(final ViewHolder holder, int position) is called and then change the state of the button. But it doesn't work, the button clicked does not change its state. ViewHolder class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{ ToggleButton button; String id; public