When I use in layout, which specifies this dialog android:layout_width="match_parent"
I get this dialog:
I need dialog which will be wider. Any ideas?
When I use in layout, which specifies this dialog android:layout_width="match_parent"
I get this dialog:
I need dialog which will be wider. Any ideas?
Another way to fix this is to use:
instead of:
You can do that by grabbing the
Window
object that the dialog uses, and resetting the width. Here's a simple example:Here's the end result. Note that there's a lot more styling you can do to the dialog if you need to fine tune things (like change the background, etc). When I've had to do this in the past, I usually use this method, and customize the layout used in the dialog with
setView()
on the builder class.