android横屏切换不销毁-Handling the Configuration Change Yourself
16lz
2022-07-06
做了一段时间的系统开发后,深深的发觉自己的基础知识忘记了好多
,开始猛看developer.android.com/。
无意发现了原来可以设置横屏切换不destroy和onStart的设置
for example:
上面解释说:
Now, when one of these configurations change, MyActivity does not restart. Instead, the MyActivity receives a call to onConfigurationChanged().
onConfigurationChanged()来处理了,
整个功能叫 Handling the Configuration Change Yourself。
自定义处理配置改变?
,开始猛看developer.android.com/。
无意发现了原来可以设置横屏切换不destroy和onStart的设置
for example:
<activity android:name=".MyActivity" android:configChanges="orientation|keyboardHidden" android:label="@string/app_name">
上面解释说:
Now, when one of these configurations change, MyActivity does not restart. Instead, the MyActivity receives a call to onConfigurationChanged().
onConfigurationChanged()来处理了,
整个功能叫 Handling the Configuration Change Yourself。
自定义处理配置改变?
更多相关文章
- android EditText设置不可写
- android“设置”里的版本号
- 在Fragment中设置控件点击方法,执行失败。
- Android(安卓)闹钟管理类的使用
- Android设置通知栏/状态栏透明改变通知栏颜色和app最上部分颜色
- android 设置中划线 下划线等
- Andorid Dialog 示例【慢慢更新】
- android图表ichartjs
- Android(安卓)闹钟管理类的使用