Android Question Visual Designer Script Headache

Paul_

Member
Licensed User
I have two script variants, they both work correctly from the visual designer via the bridge but when the app is in release mode the device seems to ignore the script designed for its size 720 x 1280 and uses the 600 x 1024 script.

The visual designer correctly identifies the device screen size (screen capture with yellow highlight).

What am I doing wrong?

Designer Screenshot.jpg
Designer Screenshot.png
Release Screenshot.png
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The large images make this post unreadable.

Avoid using multiple variants. They are difficult to maintain.
Especially avoid having variant specific scripts.

There is no relation between 720x1280 scale=2 and 720x1280 scale=1. They are two completely different screen sizes.

It seems that you are not using anchors. Use anchors whenever you can.

I recommend you to watch these two video tutorials:

Visual Designer: https://www.b4x.com/etp.html?vimeography_gallery=1&vimeography_video=254439386
B4A Scale: https://www.b4x.com/etp.html?vimeography_gallery=1&vimeography_video=255360185
 
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
i remember that the "what you see is was you get" preview app at device works only if me clicked into the script variant.
i saw u used AutoScaleRate.
 
Upvote 0

Paul_

Member
Licensed User
My apologies for the large images, I should have resized.

Yes Markus, when I click on the correct variant and click in the script window it shows correctly on the device.

The problem is when the app is installed in release mode the device seems to ignore the script for it's own size, my question is if it works with the designer why doesn't the device pick the correct script when running?

I have set anchors on the views.

I thought maybe I had just missed something very silly.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I thought maybe I had just missed something very silly.
There is no relation between 720x1280 scale=2 and 720x1280 scale=1. They are two completely different screen sizes.

There are several conceptual mistakes here. Watch the two tutorials. They will help you.

The first step in fixing this layout (after you understand the problems) is to delete the two tablet sized variants you created and work with the default phone sized variant.
 
Upvote 0
Top