I have developed an Android app with 5 fragments in Single Activity architecture using a Navigation graph. The issue right now I'm facing is each fragment is destroyed when a new fragment launches when I back pressed old fragment is recreated and a UI glitch is observed. There is no need for fragment recreation. Why this is occurring and How to overcome this?
Asked
Active
Viewed 92 times
0
-
The fragment is destroyed(onDestroy) or the UI of the fragment is destroyed(onDestroyView)? – TheLibrarian Nov 15 '22 at 15:21
-
UI of the fragment is destroyed is destroyed – Mohan K Nov 16 '22 at 06:42
-
Well, AFAIK that is intended behavior. If you have any glitch in UI, that is the core of your problem. – TheLibrarian Nov 16 '22 at 11:32