Set your theme at run time in the onCreate() method using setTheme(int). Check 
it out 
here<http://developer.android.com/reference/android/view/ContextThemeWrapper.html#setTheme(int)>
.
 
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);
}

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