Android Question [Solved]Get Screen ratio

Almog

Active Member
Licensed User
Hello,

Does anybody know how to get the ratio of the user's screen?

For example 4:3 or 1:0.75..
I tried Activity.height / Activity.width but the result is 1.

Thanks in advance
 

MarkusR

Well-Known Member
Licensed User
Longtime User
i guess its 1 because u useing integer division and not float/double.
B4X:
Dim lv As LayoutValues = GetDeviceLayoutValues
 
Upvote 0
Top