1

I want to use two styles in my application : android:Theme.Black and android:Theme.Light. In my app user can choose style when application is installed and run.

My question : How to change style of app, when it's running ? It's very important for me. Very,very thanks,

PS Style is defined in res/values/styles.xml

tshepang
  • 12,111
  • 21
  • 91
  • 136
TN888
  • 7,659
  • 9
  • 48
  • 84
  • Use search: http://stackoverflow.com/questions/2482848/how-to-change-current-theme-at-runtime-in-android – Leonidos Jan 09 '13 at 19:41

1 Answers1

0

I solved it :

getApplication().setTheme(R.style.BlackTheme);

/res/values/styles.xml

<resources>
    <style name="BlackTheme" parent="@android:style/Theme.Black">
    </style>    
</resources>
TN888
  • 7,659
  • 9
  • 48
  • 84