You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
15
15
- Added possibility to let the library handle the savedInstanceState in order to keep the selection in place when orientation
16
16
and other configuration change
17
17
- Added `deselect(int position)` method to the MultiChoiceAdapter
18
+
- Added `refreshDataSet()` method to the MultiChoiceAdapter in order to be able to keep a valid internal state of the selected/deselected items. This will then delegate the actual `RecyclerView.Adapter#notifyDataSetChanged()` to do the rest.
Copy file name to clipboardExpand all lines: library/multichoicerecyclerview/src/main/java/com/davidecirillo/multichoicerecyclerview/MultiChoiceAdapter.java
+2-1Lines changed: 2 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -168,7 +168,8 @@ public void onRestoreInstanceState(Bundle savedInstanceState) {
168
168
}
169
169
170
170
/**
171
-
*
171
+
* Use this method instead of {@link RecyclerView.Adapter#notifyDataSetChanged()}
172
+
* and it'll automatically handle the list refresh without loosing current item state
0 commit comments