On Jan 5, 2012, at 10:46 AM, Tomasz Cielecki wrote:
> Yes, in your activity where you set Label and other parameters for it, you
> can set the theme.
...
> [Activity(Theme = "@style/Theme.MyAwesomeTheme", Label =
> "@string/MyAwesomeActivity")]
That's not programmatically, that's declaratively, as that winds up in
AndroidManifest.xml setting the //activity/android:theme attribute. :-)
To programmatically set the theme, use Context.SetTheme(int):
http://androidapi.xamarin.com/index.aspx?link=M%3aAndroid.Content.Context.SetTheme(System.Int32)
http://stackoverflow.com/questions/4967904/androidhow-to-programmatically-set-an-activitys-theme-to-theme-dialog
It also sounds like SetTheme() needs to be invoked before calling
base.OnCreate().
- Jon
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid