codelab-android-navigation icon indicating copy to clipboard operation
codelab-android-navigation copied to clipboard

on back press in Navigation Component, previous fragment's onCreateView, onViewCreated call again

Open vijay81 opened this issue 3 years ago • 3 comments

How can i add fragment on Navigation controller (Navigation component) Instead of replace? I tried to navigate fragment according to android architecture but i am not possible to understand how i add or replace fragment as our previous architecture. example: if i move A fragment to B fragment and when i press back from B fragment then A fragment always gets reload. Suggest me any one if i do add fragment

vijay81 avatar Jun 03 '22 05:06 vijay81

邮件已经收到了,谢谢!

mtf7101520 avatar Jun 03 '22 05:06 mtf7101520

Can we have any stable solution for this problem? or any workaround with a proper and feasible approach

Dhruv-Limbachiya avatar Jun 03 '22 06:06 Dhruv-Limbachiya

I have faced the same issue. can anyone found a proper solution without saving a fragment state?

rajputprashant1612 avatar Jun 03 '22 07:06 rajputprashant1612