Im using fragments to change the ui if a user is navigating through the menu. My problem is, that every time a fragment is replaced by another, the app freezes for a sec because it is processing on the main thread. I have read about using Threads to process things in the background but if a fragment is replaced by another you cant do it, because it has to be loaded in the main thread.
So, is there a way to load fragments in the background to prevent lags if the user navigates through the menu?
Hope you guys understand me, I tried my best. Geigerkind
Edit: For anyone stumbelling about the same problem: Mo Adel's suggustion and this Link helped me solving the problem Optimizing drawer and activity launching speed