Skip to main content

How to get the number of pixels vertically and horizontally ?

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-05-18

I want to show a Dialog with the method signature show(int top, int bottom, int left, int right, boolean includeTitle)

I want to place this Dialog in the center of the screen. So I want to know the total number of pixels of the screen vertically and the total number of pixels of the screen horizontally.

How to achieve that ?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2003-11-07