The window will be resized to wrap its content. Be sure in your 9-patch that you have correctly indicated the content area along the right and bottom edges. If that isn't the problem, you can use hierarchyviewer to see what is going on with the layout of the view hierarchy if your window. You don't want to set a specific layout size.
On Sat, Apr 2, 2011 at 4:30 PM, Nick Longinow <[email protected]>wrote: > Getting much closer. But not quite. I've got my customized background > (nine patch) built and assigned to the alert window. But, its huge > while the dialog list items are normal size. I did > alert.getWindow().setLayout(50, 50) to resize that window but it has > no effect. Still have this huge background and small dialog > contents. Must be missing something big here. > > Here is my Dialog display code: > > mAlert = builder.create(); > mAlert.requestWindowFeature(Window.FEATURE_NO_TITLE); > mAlert.getWindow().setLayout(50, 50); > // *** this is the nine patch (looks > beautiful by the way, just huge) > > > mAlert.getWindow().setBackgroundDrawable(getResources().getDrawable(R.drawable.eight)); > // *** > mAlert.show(); > > > On Apr 2, 4:16 pm, Nick Longinow <[email protected]> wrote: > > Successfully got a .9.png file created and applied it to my ListView - > > looks very nice. Problem - the AlertDialog I want to use it for seems > > to add a rectangle with white interior as a container or border around > > my ListView. I'd like it to be transparent, and only show the > > ListView. Do I have to do an "extends alertdialog" class to get rid of > > that white border? > > > > On Mar 30, 6:21 pm, Nick Longinow <[email protected]> wrote: > > > > > > > > > Then that's what I'll do. Moving the triangle around randomly isn't > > > very important. Thanks all. > > > > > On Mar 29, 10:29 pm, Dianne Hackborn <[email protected]> wrote: > > > > > > No, use a 9-patch. That said, if you want to actually position the > triangle > > > > at different places in the border you probably will need to give up > on just > > > > setting a custom background drawable and have to draw your own > background > > > > with things positioned where you want. > > > > > > On Tue, Mar 29, 2011 at 6:06 PM, Nick Longinow < > [email protected]>wrote: > > > > > > > I'm looking for something more like a <shape> where the vertices > are > > > > > set to like a rectangle, but with one side that has a triangle > shape > > > > > coming out of it. I believe I create this as a drawable in the XML > > > > > layout, and then set the Dialog to use this drawable as the > > > > > background. True so far? > > > > > > > On Mar 27, 11:01 pm, Hari Edo <[email protected]> wrote: > > > > > > If you mean like the SMS app, you can do that with a .9.png > > > > > > image file, also called a "Nine Patch." > > > > > > > > > http://developer.android.com/guide/topics/graphics/2d-graphics.html#n... > > > > > > > > On Mar 27, 10:34 pm, Nick Longinow <[email protected]> > wrote: > > > > > > > > > Like a balloon-style dialog, with one side of the dialog having > a > > > > > > > triangle coming out of it so that the dialog appears to point > to some > > > > > > > portion of the screen. I've seen these in alot of apps - what > is the > > > > > > > basic idea here? Is it use of shapes and themes? Any simple > examples > > > > > > > out there?- 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 > > > > > > -- > > > > 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, 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.- Hide quoted text - > > > > > > - Show quoted text -- Hide quoted text - > > > > > - Show quoted text -- 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 > -- 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, 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 [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

