Thanks NJ

On Apr 16, 6:21 am, Nicholas Johnson <[email protected]> wrote:
> Set your theme at run time in the onCreate() method using setTheme(int). Check
> it out 
> here<http://developer.android.com/reference/android/view/ContextThemeWrapp...)>
> .
>
> I do this with my app, and it works very well. My onCreate() method looks
> something like this:
>
> public onCreate(Bundle b) {
>
>     /* Get your preference here */
>
>     /* Set the theme before calling setContentView() */
>     switch (theme) {
>     case X:
>         setTheme(R.style.theme1);
>         break;
>     case Y:
>         setTheme(R.style.theme2);
>         break;
>     }
>
>     super.onCreate();
>     setContentView(R.layout.layout_name);
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -

-- 
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

Reply via email to