2. Jetpack源码解析---Navigation为什么切换Fragment会重绘
要使用'Navigation',就一定会遇到这个重绘的问题,可以用'ViewModel'来保存数据,配合activity的scope来做数据保存。
Navigation, Saving fragment state#530
Open fragment without lose the previous fragment states
Support multiple back stacks for Bottom tab navigation
Handling errors with Retrofit and Coroutines in a single place