onConfigurationchanged没有叫过软糖(4.2.1) [英] onConfigurationchanged is not called over jellybean(4.2.1)
问题描述
我真的患上了这个问题。
我已经设置了标志安卓configChanges =keyboardHidden |方向|区域设置
I really suffer from this issue.
I already set the flag android:configChanges="keyboardHidden|orientation|locale"
但是,当我改变了语言的结构, onconfigurationchanged
函数没有被调用。
奇怪的是,我的codeS做工精细超过其他Android平台。
But when I changed configuration of language, onconfigurationchanged
function isn't called.
The strange thing is that my codes work fine over other android platform.
我在这里搜索了这个问题。
有人说,我需要设置 SDK
版本低。但它并没有正常工作。
I searched this issue here.
Someone said that I need to set sdk
version lower. But it didn't work.
请给我一些建议。
推荐答案
添加的layoutDirection
属性,如安卓configChanges =keyboardHidden |定位|区域|的layoutDirection
如果您正在使用API 17
Add the layoutDirection
attribute, such as android:configChanges="keyboardHidden|orientation|locale|layoutDirection"
if you're working with API 17.
的layoutDirection
这也与界面语言变化连接API引入17的 Android的文档的一块有关安卓configChanges
是不够明确的有关事实,但至少我们有:
layoutDirection
that is also connected with interface language changes was introduced in API 17. Piece of android docs about android:configChanges
is not explicit enough about that fact, but at least we have:
的layoutDirection:的布局方向发生了变化。例如,从改变 左到右(LTR)以从右到左(RTL)。 添加在API级别17
layoutDirection: The layout direction has changed. For example, changing from left-to-right (LTR) to right-to-left (RTL). Added in API level 17.
这篇关于onConfigurationchanged没有叫过软糖(4.2.1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!