I have a FragmentA(with Recyclerview) and a FragmentB(item). When I click in A to jump to B, the page lags a bit, maybe I updated the content in the main thread? But I don’t seem to be doing that.
In FragmentB, I have some text and 3 Recyclerview, maybe the recyclerview cause the lag?
May be I need to load the data after the transition animation is complete? How to finish it?
2
Answers
It can be because of many things. Check if you are using a large image size that can use more power and time to render. Try to move your long operations into coroutines.
As your layouts has one image, 3 recycler view & other stuff there is many cases for layout lagging.
2.May your 3 recycler listing has large number of items & you are loading them immediately after creating your fragment view. (Try: put them into the runnanble & load them after some delay of a time)