summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings
diff options
context:
space:
mode:
authorYi-Ling Chuang <emilychuang@google.com>2020-06-22 14:53:10 +0800
committerYi-Ling Chuang <emilychuang@google.com>2020-06-22 14:53:10 +0800
commitb54f9b4921547ea931ad1c939a6220279daa34c8 (patch)
tree5080c4d9759efecbd4894abc7abe5a195bb7b73d /src/com/android/settings
parent3f8d40bd954b6369e9ecb195cc94e94aefac48c7 (diff)
downloadpackages_apps_Settings-b54f9b4921547ea931ad1c939a6220279daa34c8.tar.gz
packages_apps_Settings-b54f9b4921547ea931ad1c939a6220279daa34c8.tar.bz2
packages_apps_Settings-b54f9b4921547ea931ad1c939a6220279daa34c8.zip
Disable the defulat animation of the RecyclerView to avoid UI jank.
When users go to a sub page in Settings and come back to the homepage again, those sticky cards flicker which makes the UI janky. This is because we rebind sticky cards to ensure it's always up-to-date, where the recyclerView has its default animation while notifyItemInserted(), ane thus introduce the jank. Fixes: 158627602 Test: Open Settings -> go to sub pages -> back to the homepage -> cards are not flickering. Change-Id: I2104dbe0bed8b2486c35521bcc0b5c8b54efb995
Diffstat (limited to 'src/com/android/settings')
-rw-r--r--src/com/android/settings/homepage/contextualcards/ContextualCardsFragment.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/com/android/settings/homepage/contextualcards/ContextualCardsFragment.java b/src/com/android/settings/homepage/contextualcards/ContextualCardsFragment.java
index ebfaca9544..9f0023aa15 100644
--- a/src/com/android/settings/homepage/contextualcards/ContextualCardsFragment.java
+++ b/src/com/android/settings/homepage/contextualcards/ContextualCardsFragment.java
@@ -109,6 +109,7 @@ public class ContextualCardsFragment extends InstrumentedFragment implements
mCardsContainer.setLayoutManager(mLayoutManager);
mContextualCardsAdapter = new ContextualCardsAdapter(context, this /* lifecycleOwner */,
mContextualCardManager);
+ mCardsContainer.setItemAnimator(null);
mCardsContainer.setAdapter(mContextualCardsAdapter);
mContextualCardManager.setListener(mContextualCardsAdapter);
mCardsContainer.setListener(this);