Android Question The layout at design time does not match to the layout displayed at run time

Discussion in 'Android Questions' started by uniplan, May 7, 2015.

  1. uniplan

    uniplan Active Member Licensed User

    I have designed a simple form using the designer connected to my tablet (samsung galaxy tab 4).
    The problem is that what I see in at design time is not one that is displayed at runtime.
    In particular the size of the objects are enlarged and go out of the screen.
    What could be the problem? Is there a way to solve it?

  2. lemonisdead

    lemonisdead Well-Known Member Licensed User

  3. Cableguy

    Cableguy Expert Licensed User

    That's because the designer is using a different screen variant than the actual device is.
    check on the designer layout screen... you should see a small box with "variant Layouts" and typically the "320 x 480 scale 1" wich is the default variant. you also have a "new" button...try it. On the Abstract designer you can see the layout in use in the window title Like "Abstract Designer 100% 320x480, scale=1". Clicking the Layout menu gives you a list of choices... by default, "Match Chosen Variant" is selected, so your device screen behaves like the chosen variant. If you select "Match Connected Device", now you are using YOUR DEVICE screen props as a Layout Base...

    Working with layouts is one of the trickiest but also the most important aspect of any app... it's what the user will see!
    Do take the time to read this forum pertinents threads as well as those suggested by LemonIsDead...
    Don't skip Klaus Beginners Guide either!
    Harris, DonManfred and Peter Simpson like this.
  4. uniplan

    uniplan Active Member Licensed User

    Hi Cableguy,
    I selected "Match Connected Device" but the problem persists.
    What I see on abstract designers and what I see on my tablet screen at the design time does not match what I see on the tablet screen at runtime.

  5. Cableguy

    Cableguy Expert Licensed User

    Delete the "autoscaleall" from the designer script window... Obviously you HAVEN'T SEARCHED ENOUGH ABOUT THIS MSTTER IN THE FORIM NOR HAVE YOU READ THE BEGINNER'ANUAL!!
    DonManfred and RandomCoder like this.
  6. uniplan

    uniplan Active Member Licensed User

    You're right. Sorry.
  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