OiO.lk Blog Android Loading data into my ListAdapter with submitList is blocking my UI thread
Android

Loading data into my ListAdapter with submitList is blocking my UI thread


I have a RecyclerView with a ListAdapter and my problem is simple, but I haven’t seen a solution anywhere. I have a list of approximately 90 elements and when I load them with the submitList it blocks the main thread. On top of that, I access this fragment from the bottomNav and until I have practically loaded all the elements it doesn’t navigate me.

I want to point out that the data loading is done in another thread with a Coroutine and that it does not affect the loading time at all, only and exclusively the adapter’s submitList. I have tried to load the lifecycle state where it loads and I have not achieved anything either.



You need to sign in to view this answers

Exit mobile version