
demo地址:https://github.com/VIVILL/JetpackDemo[https://github.com/VIVILL/J...
使用Navigation返回时Fragment重走生命周期,根本原因是返回时调用replace()方法替换了原来的fragment,导致每次回到...
代码地址:https://github.com/VIVILL/SimpleDemo/tree/main/ViewPager2/slideconf...
在activity中使用协程很方便。在添加依赖implementation 'androidx.lifecycle:lifecycle-runt...
代码地址:https://github.com/VIVILL/SimpleDemo/tree/main/Banner[https://githu...
paging3有3种使用方式。 从数据库加载页面 从网络加载页面 从网络和数据库加载页面 1.从数据库加载页面 首先,模拟生成数据。 然后通过 ...
最后效果图如下: 添加gradle。 新增navigation.xml。 新增bottom_nav.xml。 MainActivity 中初始化...
本篇代码地址:https://github.com/VIVILL/SimpleDemo/tree/main/Flow[https://githu...
banner部分的实现,主要参考这篇:ConcatAdapter[https://github.com/muhammedcobanoglu/Co...