Adding configChanges ="locale" programmatically
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.
精彩评论