After creating a custom Dialog using a ListView and my own implementation of ListAdapter, I notice that the width of the dialog changes depending on the device screen size (and perhaps on other factors I’m not aware of).
I’d like to use a different layout for wider dialogs. What are some good ways to get the width of a Dialog, preferably before calling Dialog.show()?
Take a look at the Supporting Multiple Screens guide.
What you basicaly need to do is create a layout res folder for each screen size you intend to support: