What exactly do you mean with this?
If you want to maintain the Width/Height ratio, you could use: imvTest1.Bitmap = LoadBitmapResize (File.DirAssets, "bild2.jpg", imvTest1.Width, imvTest1.Height, True)
With the last parameter KeepAspectRatio As Boolean = True
You can find a small test program HERE.
If I Create Imageview in runtime,then we need to set height and width for Imageview ???/
B4X:
Dim ImgThum As ImageView
ImgThum.Initialize("ImgThum")
ImgThum.Height = ? ' what to put here
ImgThum.Width = ? ' what to put here
ImgThum.Bitmap= LoadBitmapResize(StrCabinet_Path,TmpRst.GetString("FileName"),ImgThum.Width,ImgThum.Height,True)
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.