转载自:https://www.jianshu.com/p/7512ae8c93f0
防止activity销毁重建:可在Activity的节点加入:
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
本文介绍了一种在Android开发中防止Activity因配置改变而被销毁重建的方法,通过在Activity的节点中加入特定属性,如screenSize、smallestScreenSize、screenLayout和orientation,可以避免设备旋转等配置变化导致的Activity重建,提高用户体验。
转载自:https://www.jianshu.com/p/7512ae8c93f0
防止activity销毁重建:可在Activity的节点加入:
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
1951

被折叠的 条评论
为什么被折叠?