Android Question Basic designer scripts question

saunwin

Active Member
Licensed User
Longtime User
Hi Guru's

Just a quick basic script question. Just for my brain to tidy up.

If there are several designer script variants, does the (compiled) tablet app fetch the tablet dimensions and run the correct script ?

Do we have any control over which script runs ? (i.e. nearest to actual size)

Or have I got the wrong end of the stick here ?

Many thanks.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The "best match" variant is chosen when the layout is loaded based on the variant size and the device screen size. The script of the selected variant will be applied.

I recommend you to use as few as possible variants and preferably put all the designer script in the general script.
You can use code such as the following code to change the layout based on the screen size (ActivitySize returns the approximate screen size in inches):
B4X:
If ActivitySize > 6 Then
   '...
Else
   '...
End If
 
Upvote 0
Top