Android Question Why is my layout not display properly on my device?

Discussion in 'Android Questions' started by davepamn, Jun 18, 2015.

  1. davepamn

    davepamn Active Member Licensed User

    800x1200
    Code:
    lblPrinter.Top=0dip
    lblPrinter.Left=
    0
    lblPrinter.Height=
    10%y
    lblPrinter.TextSize=
    20
    lblPrinter.Width=
    100%x

    cmdLoadData.Top=lblPrinter.Bottom
    cmdLoadData.Width=
    100%x
    cmdLoadData.Left=
    0dip
    cmdLoadData.TextSize=
    20
    cmdLoadData.Height=
    10%y
    In designer the layout looks correct, but on the device the control heights are being ignored. Is there a layout type that is required?

    Version: 5.02

    Device: Samsung Galaxy

    Layout works correctly in version: 4.0

    Designer has variant 600x960 and 960x600. How can I get this variant in 5.0
     
    Last edited: Jun 18, 2015
  2. davepamn

    davepamn Active Member Licensed User

    I found the problem. I needed to create two variants 960x600 and 600x960 and the code worked.
     
Loading...