Well it seems stupid but i miss something.
Let say i have an imageview and i want to put a logo inside
i set this imageview in the script editor in this way:
I know that i want the logo to cover almost all screen 5/95 but i dont know how to set the height correctly, for example in photoshop you can resize by keeping proportions, but here?
Image gravity FILL
how i can calculate the height so the image does not get streched knowing only the width?
Thanks
ps i tried something like this but is not ok
Let say i have an imageview and i want to put a logo inside
i set this imageview in the script editor in this way:
B4X:
imgview.top = 0%y
imgview.SetLeftAndRight(5%x,95%x)
I know that i want the logo to cover almost all screen 5/95 but i dont know how to set the height correctly, for example in photoshop you can resize by keeping proportions, but here?
B4X:
Dim imgwidth as int
imgwidth = imgview.width
Image gravity FILL
how i can calculate the height so the image does not get streched knowing only the width?
Thanks
ps i tried something like this but is not ok
B4X:
Dim logobmp As Bitmap
logobmp.Initialize(File.DirAssets, "logo.png")
Dim logoHeight As Int
logoHeight = logobmp.Height /logobmp.Width *logobmp .Width
imageview.Height = logoHeight
img_imageview.Bitmap = logobmp