android - how can I prevent activity label from changing when rotating -


i use settitle change activity label on runtime. every time when rotating phone, activity label changes initial state. how can prevent this?

write following in activity declaration in manifest file

android:configchanges="orientation" 

it prevent activity restarted when orientation changed.

edit:

from so answer suggested use following newer api

android:configchanges="keyboardhidden|orientation|screensize" 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -