Chris Chris - 1 year ago 94
Android Question

How to programatically set Android application theme for all activities

I have already googled setting application themes quite a bit and what I found was to either use the

or to set it use
is called. I am going to allow users to switch between 2 themes I have created in the settings so I have to go the
route. I have already figured out how to set it but I am wondering how I would set the user selected theme to ALL activities. Currently it only applies to the main activity.

flx flx
Answer Source

IMHO the best approach is creating a BaseActivity extending Activity to do the setTheme() in onCreate() based on the settings.
Then let every Activity extend BaseActivity.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download