search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

3 answers
Q&A android - Question about checkbox in recyclerView.
android - Question about checkbox in recyclerView.
曾经蜡笔没有小新 2017-07-06 10:36:18 Views 1950

0

As shown in the picture, click on the time of today’s checkbox. How to make all checkboxes selected? Please provide me with ideas

Your Answer
submit

3 answers
0

I’ll give you a wheel, it’s actually very simple. Address: https://github.com/JerryMissT...

2017-07-06 10:38:18

submit

0

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?

2017-07-06 10:38:18

submit

0

Xie Yao.

  1. Listen to checkbox events, copy, and operate sub-checkboxes

  2. 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
        }

    }
});
2017-07-06 10:38:18

submit

Popular tool

vc9-vc14 (32+64 bit) runtime library collection (link below)

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

VC9 32-bit phpstudy integrated installation environment runtime library

PHP programmer toolbox full version

PHP programmer toolbox full version

Programmer Toolbox v1.0 PHP Integrated Environment

VC11 32-bit

VC11 32-bit

VC11 32-bit phpstudy integrated installation environment runtime library

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use