Respect_Jolly•

apart from the payload being a bundle (which is not a problem, but there is no reason to be IMO), your implementation is the optimal one for simple cases. I would do it very similar. On a side note, if you were to persist the checked state you could still keep your implementation (which I agree, is overengineering rendering the entire list for a check change, but would probably have to find a way not to trigger the refresh mechanism of an observable dataset.

2
First_SpectrOP•

Thank you so much. It was important for me to know that I had not missed some obvious and simple solution. Would do you preffer to use in payload? Maybe class Item and just bind all field?

1
Respect_Jolly•

I just use regular constants and throw an exception if an unidentified one appears. It is not typesafe, but I don't really care. Normally, it's a compromise between type-safety and unnecessary object allocations in which this trivial example is included in the first for me. If you are of concern, use enums ;p

2
Respect_Jolly•

Actually, I missed the part when you use payloads as data update sending mechanism. I think this is an incorrect approach. Payloads are used to signalize what part of the view has changes, not the data change itself.

2
First_SpectrOP•

But I'm already use payload only to update viewHolder state, not the data, didn't I?
Or I misunderstood you, my English is at a low level, sorry if so

1
sudhirkhangerMOD•

You may post about code, design, distribution, marketing, hiring, etc. as long as it does not conflict with any other rules. We only ask that it has something to do with Android development. Please note that this is not the place for ROM development, and should be taken to more appropriate venues like xda-developers.

1
First_SpectrOP•

What rule have I broken?

1