Hello,
I am trying to load a Layout based on if it's a Phone or a tablet.
As you know tablets have a bigger screen than a phone and I want to load a different Layout based on the screen size.
I know how to load a layout by using the following code:
I also know you can create a design script to move the objects based on percentage etc..
however what is the best way to detect what screen size the user is using, so I know what layout to show?
Is there a easy way to tell if a user is using a phone, 7" tablet or 10" tablet ?
If so, what is the best code to use to detect the screen size etc.
I am trying to load a Layout based on if it's a Phone or a tablet.
As you know tablets have a bigger screen than a phone and I want to load a different Layout based on the screen size.
I know how to load a layout by using the following code:
B4X:
Activity.LoadLayout("Layout_Name")
I also know you can create a design script to move the objects based on percentage etc..
however what is the best way to detect what screen size the user is using, so I know what layout to show?
Is there a easy way to tell if a user is using a phone, 7" tablet or 10" tablet ?
If so, what is the best code to use to detect the screen size etc.