How to save fragment state while navigating with navigation component

后端 未结 6 1034
既然无缘
既然无缘 2021-01-02 14:24

I\'m trying to create a single activity app using android architecture components. I have a fragment A which has some textfields, when user pushes a button I navigate to fra

6条回答
  •  清歌不尽
    2021-01-02 14:49

    Basically you need to use ViewModel for manage lifecycle. Then after check this Android Architecture Components Advanced Navigation Sample

提交回复
热议问题