Chris Chris - 8 months ago 38
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

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.