Skip to content Skip to sidebar Skip to footer

Wrong Section Tag Value

I'm try to remove some rows from section one and some from section two, but sectionAdapter.notifyItemRemovedFromSection(TAG, key); TAG always return the 2st section list string TA

Solution 1:

You are storing all the selected checkboxes from all sections in this selectedCheckBox map, but when the deleteAll button is tapped you call notifyItemRemovedFromSection from the section where it is in.

You will have to change your selectedCheckBox map to also store which section 'tag' that checkbox belongs to, then when you call notifyItemRemovedFromSection you can pass the correct 'tag'.

Post a Comment for "Wrong Section Tag Value"