Share My Creation ScreenDat


Active Member
Licensed User
There are frequent questions on the forum about how to determine screen dimensions. I decided to write a very simple program to illustrate getdevicelayout values, Activity.Width/Activity.Height, and %X/%Y.

Please note that:

If your device (like my Droid 2) does not use soft keys in the display (eg., Back, Home, etc.) then GetDeviceLayoutValues will give you the physical screen size. Otherwise it returns the physical screen size minus the pixels needed to display the soft keys. In other words, it is the maximum usable screen size (often different than actual usable screen size - see below).

Activity.Height and Activity.Width return the same values as %100X and 100%Y (this is the actual usable screen space).

The activity properties "Full Screen" and "No Title" affect usable width & height: Running full screen with no title will result in maximum usable screen size (as reported by getdevicelayoutvalues), otherwise the actual usable screen size will be less than the maximum usable screen size.