Android Question Add image to my project

ovt001

Member
Licensed User
Longtime User
Hi everybody,
My question will be for sure stupid, but how can I add an image (JPG) to a form?.
Did I first to copy the xxx.jpg file on my Android smartphone? so yes where?
I read the post about ImageView but all the sample that I find use ImageView1.Bitmap = LoadBitmap(File.DirAssets, "test.jpg"). Where is the File.DirAssets located?

thank you
O.
 

udg

Expert
Licensed User
Longtime User
An old professor of mine used to say "there are no stupid questions, just things you already know and others you don't".
File.DirAssets is a read-only folder that corresponds to your IDE tab "Files Manager" (bottom right in standard IDE).
So when developing you add your image file to the File Manager and in your code use an ImageView's LoadBitmap (better LoadBitmapSample) function to read it in and display on the form the imageview is in.

udg
 
Upvote 0

ovt001

Member
Licensed User
Longtime User
So when developing you add your image file to the File Manager and in your code use an ImageView's LoadBitmap (better LoadBitmapSample) function to read it in and display on the form the imageview is in.

Thank you udg. I
 
Upvote 0
Top