Android Question Tablet 7 vs Smart 5, same code, diferent sizes

Discussion in 'Android Questions' started by Alberto Michelis, Jul 8, 2015.

  1. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Hi,
    Im trying to get a better view in a tablet 7.
    Same code, nothing changes betwwen a Samsung Note 3 5" vs an LG tablet 7" and the app in the tablet looks smaller, see image...
    Titles and data in the tablet is smaller than the phone... same code
    Why is this happening any idea to get it better?
    Thanks
     

    Attached Files:

  2. Cableguy

    Cableguy Expert Licensed User

    It's happening because the devices have different screen sizes and densities. If you are not scaling using dip or %, then it will look smaller
     
  3. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Then I´ll have to add a Tablet variant and use AutoScaleRate(xx) ?
    Is there any way to use app varibles in the view script variant code?
    Thanks
     
  4. Cableguy

    Cableguy Expert Licensed User

    use percentage when positioning like label1.Left = 10%x
    imagine your screen in a grid, make it as small as you are confortable with and place your views. use anchors, try to relativize to the max the views positions, like the next view left is taken from the previous view right.
     
    Peter Simpson likes this.
  5. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Thats what im doing, the view is ok, really ok.
    Problem is all is seeng smaller than the phone, see image.
     
  6. Cableguy

    Cableguy Expert Licensed User

    without seeing the layout its hard to tell. I have a 7" with me if you want me to try
     
  7. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    Thank you very much, ive attached the .bal, you may see the difference just looking at the labels an how small they seams in the tablet.
     

    Attached Files:

  8. Erel

    Erel Administrator Staff Member Licensed User

    You should call AutoScallAll in the designer script.

    You should also use anchors (you can probably remove all the script code by setting anchors).
     
    Harris and DonManfred like this.
  9. Alberto Michelis

    Alberto Michelis Active Member Licensed User

    I am using AutoScale, not using anchors, no need, the screen is very very simple, it looks ok but the font size and the list line height are smaller than a phone.
    I´ve posted my .bal, its easy to see.
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    I don't see a call to AutoScaleAll in the layout file.

    BTW, anchors are very simple to use.
     
Loading...