Hi!
I don´t get it! I want to fit the image which I load from "/100Media/" on the screen. It is always too large. What is wrong with this code?
And how does it work for an image in landscape mode??
I don´t get it! I want to fit the image which I load from "/100Media/" on the screen. It is always too large. What is wrong with this code?
B4X:
Dim Bitmap1 As Bitmap
TouchImageView1.Initialize("TouchImageView1")
Activity.AddView(TouchImageView1, 0, 0, 100%x, 100%y)
TouchImageView1.MinScale=0.5
TouchImageView1.MaxScale=1.5
TouchImageView1.TranslatePadding=64dip
Bitmap1.Initialize(File.DirRootExternal & "/DCIM" & "/100Media/", DBUpdate.vbild)
TouchImageView1.SetBitmap(Bitmap1)
TouchImageView1.Gravity = Gravity.FILL
SourceImageRect.Initialize(0, 0, Bitmap1.Width, Bitmap1.Height)
TouchImageViewRect.Initialize(0, 0, TouchImageView1.Width, TouchImageView1.Height)
Last edited: