android / codelab-android-navigation

Apache License 2.0
635 stars 275 forks source link

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

Open vijay81 opened 2 years ago

vijay81 commented 2 years ago

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

mtf7101520 commented 2 years ago

邮件已经收到了,谢谢!

Dhruv-Limbachiya commented 2 years ago

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

rajputprashant1612 commented 2 years ago

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