Using CheckBox in RecyclerView will cause the reuse problem of ViewHolder. The reused CheckBox after sliding will inherit the previous state.
It is recommended to modify the selected state in the bound data entity instead of directly modifying the selected state of CheckBox. At the same time, in bindData, only control the state of CheckBox based on the selected state of the data.
Please ask, is this implemented by two layers of RecyclerView, ItemDecoration or different ViewTypes?
Xie Yao.
Listen to checkbox events, copy, and operate sub-checkboxes
Customized checkbox component. I wrote it myself and operate it however I want.
Using CheckBox in RecyclerView will cause the reuse problem of ViewHolder. The reused CheckBox after sliding will inherit the previous state.
It is recommended to modify the selected state in the bound data entity instead of directly modifying the selected state of CheckBox. At the same time, in bindData, only control the state of CheckBox based on the selected state of the data.
Please ask, is this implemented by two layers of RecyclerView, ItemDecoration or different ViewTypes?
I’ll give you a wheel, it’s actually very simple. Address: https://github.com/JerryMissT...