Merge "Attempt to fix IllegalArgumentException from RecyclerView" into sc-dev

This commit is contained in:
TreeHugger Robot
2021-04-06 09:04:33 +00:00
committed by Android (Google) Code Review

View File

@@ -149,6 +149,8 @@ public class HighlightablePreferenceGroupAdapter extends PreferenceGroupAdapter
root.postDelayed(() -> {
mHighlightRequested = true;
// Remove the animator to avoid a RecyclerView crash.
recyclerView.setItemAnimator(null);
recyclerView.smoothScrollToPosition(position);
mHighlightPosition = position;
notifyItemChanged(position);