开发者

Adding configChanges ="locale" programmatically

开发者 https://www.devze.com 2022-12-24 06:20 出处:网络
I use configChanges=\"locale\" on my activities. Without this options i开发者_开发问答n AndroidManifest.xml in 2.x, I am getting flickering screens.

I use configChanges="locale" on my activities. Without this options i开发者_开发问答n AndroidManifest.xml in 2.x, I am getting flickering screens.

It works in all my activities except in the preferences screen in which I have added programmatically. I have one Preference Activity --> It works after setting configChanges="locale" to the AndroidManifest.xml.

Inside of the Preference Activity, I add programmatically a new preferencescreen. For this new PreferenceScreen, I don't have an activity in the AndroidManifest.xml! So I cannot add the configChanges="locale" and the screen flickers on 2.x !!

How can I add the attribute configChanges="locale" programmatically?


I have not found a solution to add configChanges="locale" programmatically, but i created a new Pereference Activity and added the configChanges keyword to the Manifest file.

Now it works as it should.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号