Android Question Visual Designer Script Headache

Discussion in 'Android Questions' started by Paul_, Jun 10, 2019.

  1. Paul_

    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
     
  2. Erel

    Erel Administrator Staff Member Licensed 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
     
    Peter Simpson likes this.
  3. MarkusR

    MarkusR Well-Known Member Licensed 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.
     
  4. Paul_

    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.
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    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.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice