Android Question Screen size differences

antonomase

Active Member
Licensed User
Longtime User
Hi,

A trivial question. What are the differences between
- Activity.Width
- LayoutValues.GetDeviceLayoutValues.Width
- 100%x
 

Informatix

Expert
Licensed User
Longtime User
The activity object, which is a panel, can be resized (but there's no reason to do so). That's why it has a width. And this width is equal to 100%x if you don't resize it.
GetDeviceLayoutValues.Width returns the width of the screen in pixels. The value should be the same as 100%x. But GetDeviceLayoutValues.Height will return a different value than 100%y, because the space available for your application is different from the total screen height because of the notification and navigation bars.
 
Upvote 0
Top