configChanges在安卓4.0和2.2的工作? [英] configChanges work in android 4 and 2.2?

查看:128
本文介绍了configChanges在安卓4.0和2.2的工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有找到解决办法,所以我问它。
我不想刷新活动当我移动旋转为横向,所以我需要把在AndroidManifest.xml活动里面:

i didn't found the solution, so i ask it. I don't want refresh activity when i rotate mobile to landscape, so i need put in AndroidManifest.xml inside the activity:

android:configChanges="orientation|screenSize" 

我设置项目属性 - > Android的 - >项目构建目标 - > Android 4.4系统
它适用于API 13及更高版本,但我想API 8太(Android 2.2的),因为我的项目是API 8至19 API。
如果我尝试用AVD 4.3设置,例如运行项目,它工作正常。
如果我尝试用AVD 2.2运行项目这是行不通的。
如果我只放的android:configChanges =方向它只能在AVD 2.2而不是4.3

I set in Project properties -> Android -> Project Build Target -> Android 4.4 it works for API 13 and higher, but i want API 8 too (android 2.2), because my project is API 8 to API 19. if i try run project with avd 4.3 setting for example, it works fine. if i try run project with avd 2.2 it does not work. if i put only android:configChanges="orientation" it works only in avd 2.2 but not in 4.3

什么我需要做什么? 2版本?或者是有办法解决吗?
感谢所有

what do I need to do? 2 version? or is there a solution? thanks to all

推荐答案

试试这个,

android:configChanges="orientation|keyboardHidden|screenSize|screenLayout"

这篇关于configChanges在安卓4.0和2.2的工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆