Merge "Fix the IllegalArgumentException from RecyclerView" am: 8f793f5e4f
am: 227b8f0272
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2216421 Change-Id: I171aa7c274c51bf67f5a34740782c7ce78f88a09 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -148,11 +148,11 @@ public class HighlightablePreferenceGroupAdapter extends PreferenceGroupAdapter
|
|||||||
}, DELAY_COLLAPSE_DURATION_MILLIS);
|
}, DELAY_COLLAPSE_DURATION_MILLIS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Remove the animator as early as possible to avoid a RecyclerView crash.
|
||||||
|
recyclerView.setItemAnimator(null);
|
||||||
// Scroll to correct position after 600 milliseconds.
|
// Scroll to correct position after 600 milliseconds.
|
||||||
root.postDelayed(() -> {
|
root.postDelayed(() -> {
|
||||||
mHighlightRequested = true;
|
mHighlightRequested = true;
|
||||||
// Remove the animator to avoid a RecyclerView crash.
|
|
||||||
recyclerView.setItemAnimator(null);
|
|
||||||
recyclerView.smoothScrollToPosition(position);
|
recyclerView.smoothScrollToPosition(position);
|
||||||
mHighlightPosition = position;
|
mHighlightPosition = position;
|
||||||
}, DELAY_HIGHLIGHT_DURATION_MILLIS);
|
}, DELAY_HIGHLIGHT_DURATION_MILLIS);
|
||||||
|
Reference in New Issue
Block a user