Dim b As Bitmap
Dim i As ImageView
b. ' after typing the period I get the expected Intellisense
i.Bitmap. ' after typing the period I do not get any Intellisense
Ok. That code was simplistic to show Intellisense, not to actually execute. This code doesn't show Intellisense.
B4X:
Dim i As ImageView
i.Initialize("")
i.Gravity = Gravity_Center
Dim bmp As Bitmap = LoadBitmapResize(dirname, filename, i.Width, i.Height, True)
i.Bitmap = bmp
Dim pix As Int
pix = bmp. ' I could select GetPixel from the Intellisence shown here after typing period
pix = i.Bitmap. ' no Intellisense shown here after typing period so I have to type GetPixel myself :(
When I complete the code I get an unknown type error so I can see why the Intellisense doesn't show anything, but shouldn't this be valid code?
B4X:
...
i.Bitmap = bmp
Dim pix As Int
pix = bmp.GetPixel(0,0) ' no problem
pix = i.Bitmap.GetPixel(0,0) ' Unknown type: android.graphics.Bitmap
I understand. For historic reasons ImageView.GetBitmap returns an unwrapped Bitmap (android.graphic.Bitmap). So you cannot access its methods directly. You need to wrap it: