You probably couldn't do this dynamically, but you can do it in the manifest with the android:theme attribute. (Because it's in the manifest, the window manager will apply it automatically before your onCreate() is called.)
Here's an example where I inherited from a system Theme, adding a custom background, and then explicitly assigned it to LookupActivity: http://code.google.com/p/wiktionary-android/source/browse/trunk/Wiktionary/res/values/themes.xml?r=2 http://code.google.com/p/wiktionary-android/source/browse/trunk/Wiktionary/AndroidManifest.xml?r=2#27 j On Mon, May 11, 2009 at 12:58 PM, Filipe Abrantes <[email protected]> wrote: > > Hi all, > > What would be the best way to create a theme programatically and set it > as the theme of an activity. Not using onCreate, but rather really embed > it in the package in a way that if a define a background it will appear > even after onCreate finishes. My first guess is to use the > PackageManager but Im not seeing a way through... > > Thanks, > Filipe > > > > > -- Jeff Sharkey [email protected] --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

