Android Question [SOLVED] Designer Script Variant Not Working?

mmieher

Active Member
Licensed User
Longtime User
I am relatively new to Designer Scripts. The attached small project is a trimmed down version of a much larger one.

I am focused on the 1280x800 variant. The Designer Script sets all the labels to TextSize 24, but at run time, this is clearly not the case. Any ideas? The script seems to work in other variants of the same layout.
 

Attachments

  • test.zip
    10.1 KB · Views: 245

Erel

B4X founder
Staff member
Licensed User
Longtime User
You shouldn't call AutoScaleAll in the variant specific script. Your current code will cause it to be called twice.

In most cases it is a mistake to use variant specific scripts at all. You can instead do something like in the general script:
B4X:
If ActivitySize > 8 Then '8 inch
 lbOrdDate.TextSize = 24
End If

The more variants you add the more it will be difficult to maintain the layout.
 
Upvote 0
Top