Hi Dianne, this is what I did, and it didn't work:
WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); lp.width = WindowManager.LayoutParams.FILL_PARENT; lp.height = WindowManager.LayoutParams.FILL_PARENT; getWindow().setAttributes(lp); that has no effect whatsoever (I called it in onCreate(), tried calling it before and after the super.onCreate(), but no luck). What I do now is implement a custom LinearLayout for the activity where I override onMeasure() and set the width and height to the screen width and height. But that's incorrect of course, because that size is larger than the actual canvas (it doesn't account for menu and toolbars). Can you help me out here? Why is there no simple way to fix a dialog's size? Cheers, Matthias On Sep 1, 6:55 pm, Dianne Hackborn <hack...@android.com> wrote: > The dialog theme, as part of its nature, sets the top-level window layout to > be WRAP_CONTENT. You could try manually setting the Window layout width and > height to FILL_PARENT, though this is going to make for a kind-of weird > dialog (especially if one day you find yourself running on a large > screen...). > > > > On Tue, Sep 1, 2009 at 7:18 AM, matthias <m.kaepp...@googlemail.com> wrote: > > > Hi, I am also trying to find a solution to this... > > > On Jul 31, 4:41 pm, "nEx.Software" <email.nex.softw...@gmail.com> > > wrote: > > > Just out of curiosity, why are you using a dialog if you want it to > > > fill the screen? > > > simply because there are occasions where you need to replace content > > in the dialog dynamically and you don't want the dialog to resize but > > remain at full width and height. For instance, I need to display > > images of different width and height in the dialog, and I don't want > > the dialog to change size with every image the user looks at. > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---