diff --git a/res/anim/item_animation_fall_down.xml b/res/anim/item_animation_fall_down.xml new file mode 100644 index 00000000000..df2451cf638 --- /dev/null +++ b/res/anim/item_animation_fall_down.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/res/anim/layout_animation_fall_down.xml b/res/anim/layout_animation_fall_down.xml new file mode 100644 index 00000000000..f39735c157b --- /dev/null +++ b/res/anim/layout_animation_fall_down.xml @@ -0,0 +1,22 @@ + + + + \ No newline at end of file diff --git a/res/layout/settings_homepage.xml b/res/layout/settings_homepage.xml index 0ba36096672..bd54717367b 100644 --- a/res/layout/settings_homepage.xml +++ b/res/layout/settings_homepage.xml @@ -24,7 +24,8 @@ + android:layout_height="match_parent" + android:layoutAnimation="@anim/layout_animation_fall_down"/> mContextualCards; private final LifecycleOwner mLifecycleOwner; + private RecyclerView mRecyclerView; + public ContextualCardsAdapter(Context context, LifecycleOwner lifecycleOwner, ContextualCardManager manager) { mContext = context; @@ -89,6 +91,7 @@ public class ContextualCardsAdapter extends RecyclerView.Adapter> cards) { final List contextualCards = cards.get(ContextualCard.CardType.DEFAULT); + final boolean previouslyEmpty = mContextualCards.isEmpty(); + final boolean nowEmpty = contextualCards == null || contextualCards.isEmpty(); if (contextualCards == null) { mContextualCards.clear(); notifyDataSetChanged(); @@ -119,5 +124,10 @@ public class ContextualCardsAdapter extends RecyclerView.Adapter