From 0661be1769cc02b8d47a388df51311c47589ce73 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Fri, 24 Jul 2020 16:07:02 -0500 Subject: [PATCH] Disable change animations in navigation drawer --- app/src/main/java/org/tasks/ui/NavigationDrawerFragment.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/org/tasks/ui/NavigationDrawerFragment.kt b/app/src/main/java/org/tasks/ui/NavigationDrawerFragment.kt index 30417cba6..2f9f1eef7 100644 --- a/app/src/main/java/org/tasks/ui/NavigationDrawerFragment.kt +++ b/app/src/main/java/org/tasks/ui/NavigationDrawerFragment.kt @@ -14,6 +14,7 @@ import androidx.drawerlayout.widget.DrawerLayout import androidx.drawerlayout.widget.DrawerLayout.SimpleDrawerListener import androidx.fragment.app.Fragment import androidx.lifecycle.lifecycleScope +import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.RecyclerView import com.todoroo.astrid.adapter.NavigationDrawerAdapter @@ -61,6 +62,7 @@ class NavigationDrawerFragment : Fragment() { inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { val layout = inflater.inflate(R.layout.fragment_navigation_drawer, container, false) recyclerView = layout.findViewById(R.id.recycler_view) + (recyclerView.itemAnimator as DefaultItemAnimator).supportsChangeAnimations = false (layout.findViewById(R.id.scrim_layout) as ScrimInsetsFrameLayout) .setOnInsetsCallback { insets: Rect -> recyclerView.setPadding(0, insets.top, 0, 0) } return layout