You need to do this first thing, before setting the content view or otherwise touching the window.
But you really really should be setting this in the manifest. The system uses this information to improve how it launches your activity based on some information in the theme. On Wed, Feb 4, 2009 at 8:21 AM, orbit <[email protected]> wrote: > > I am trying to create a simple dialog activity. > > If i add: android:theme="@android:style/Theme.Dialog" to my <activity> > tag in my AndroidManifest.xml everything works as it is supposed to. I > get a frame around my text and the background gets dimmed. > > If i however instead if setting the theme in my manifest call setTheme > (android.R.style.Theme_Dialog); from my activities onCreate method > things get strange. I get the frame alright but the background in > black! not dimmed as it should be. > > Can anyone help me out? > > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

