Hi,
I dont see images in designer to choose.I searched forum it says images should be in imageList. Is this a datatype i dont see it in menu either.Am i missing any library. Pls guide me.
You can insert an Image into a Button in code via the following:
B4X:
Dim b as Button
b.SetBackgroundImage(LoadBitmapSample(File.DirAssets, "testimage.jpg", b.Width, b.Height))
That will create an Image from down-sampling testimage.jpg in your apk's assets folder so that it has b.Width and b.Height dimensions and then set it to b's background.
Hi,
I dont see images in designer to choose.I searched forum it says images should be in imageList. Is this a datatype i dont see it in menu either.Am i missing any library. Pls guide me.
If you want work with the images in design time, follow this steps: At the right hand you can see the Files tab. Choose this tab and then click Add Files. Navigate to the image you want and add it to your project. Now you can see it in the Files tab and can use it in any object of the project.