Navigation Component prevent to recreate fragment on back press

自古美人都是妖i 提交于 2019-12-05 08:11:33

You can't prevent calling onViewCreated method or any method of your fragment when back button pressed so you should better use view model with your list fragment and get data from server in your view model. Avoid getting data from server in your fragment since you already using Navigation UI.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!