Layout Variants only for Emulator ?

Paulsche

Well-Known Member
Licensed User
Longtime User
Question: if Layout Variants only important for emulator
or to act out various resolutions on the device ?
 
U

unba1300

Guest
My app will have about 20 different screens. Does that mean I'll need 120 different layouts to target most devices? And how would I handle that in code? Like the following?

B4X:
Select screensize
  Case > 10"
     If orientation = landscape Then
       Activity.LoadLayout("screen1largeland")
     Else
       Activity.LoadLayout("screen1largeport")
     End If
  Case > 7"
     If orientation = landscape Then
       Activity.LoadLayout("screen1lmediumland")
     Else
       Activity.LoadLayout("screen1mediumport")
     End If
  Case Else
     If orientation = landscape Then
       Activity.LoadLayout("screen1smallland")
     Else
       Activity.LoadLayout("screen1smallport")
     End If
End Select
 
Upvote 0
Top