I've got a layout that includes an ImageView which shows a background picture and I draw graphs over it.
I have 2 variants in the designer only - generic 7" portrait and the same in landscape (960*600), scale 1.
In the designer I have width and height settings for the panel as 601x680.
In the portrait designer script I set the ImageView for width = 100%x and adjust the height and position to maintain aspect ratio.
In landscape I set it for height = 100%y and adjust the width and position to maintain aspect ratio.
All works fine on 7" tablet. I've got AutoScale on. If I connect my smaller samsung S3 phone to the Designer and run the designer script, it displays fine on the phone.
However when I actually run the app on the phone, when the phone is horizontal, the ImageView width is as wide or a little wider than the screen, and vertically I can see less than half of it.
The phone resolution is 800*480 in landscape, 1.5 (240dpi)
Can't figure out why, the scripts for that bit are dead simple. I named the imageView Axes.
Portrait:
Landscape:
Is it perhaps something to do with the ImageView size settings in the designer?
I have 2 variants in the designer only - generic 7" portrait and the same in landscape (960*600), scale 1.
In the designer I have width and height settings for the panel as 601x680.
In the portrait designer script I set the ImageView for width = 100%x and adjust the height and position to maintain aspect ratio.
In landscape I set it for height = 100%y and adjust the width and position to maintain aspect ratio.
All works fine on 7" tablet. I've got AutoScale on. If I connect my smaller samsung S3 phone to the Designer and run the designer script, it displays fine on the phone.
However when I actually run the app on the phone, when the phone is horizontal, the ImageView width is as wide or a little wider than the screen, and vertically I can see less than half of it.
The phone resolution is 800*480 in landscape, 1.5 (240dpi)
Can't figure out why, the scripts for that bit are dead simple. I named the imageView Axes.
Portrait:
B4X:
Axes.Width = 100%x
Axes.Height = Axes.Width*528/460
B4X:
Axes.Height = 100%y
Axes.Width = Axes.Height*460/528
Is it perhaps something to do with the ImageView size settings in the designer?