
As shown in the picture, click on the time of today’s checkbox. How to make all checkboxes selected? Please provide me with ideas
3 answers
I’ll give you a wheel, it’s actually very simple. Address: https://github.com/JerryMissT...
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.
CheckBox repeatChkBx = ( CheckBox ) findViewById( R.id.repeat_checkbox );
repeatChkBx.setOnCheckedChangeListener(new OnCheckedChangeListener()
{
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked)
{
if ( isChecked )
{
// perform logic
}
}
});
Hot tools Tags
Hot Questions
Popular tool
vc9-vc14 (32+64 bit) runtime library collection (link below)
Download the collection of runtime libraries required for phpStudy installation
VC9 32-bit
VC9 32-bit phpstudy integrated installation environment runtime library
PHP programmer toolbox full version
Programmer Toolbox v1.0 PHP Integrated Environment
VC11 32-bit
VC11 32-bit phpstudy integrated installation environment runtime library
SublimeText3 Chinese version
Chinese version, very easy to use
Hot Topics
20417
7
13577
4






