Android Question Image

James Chamblin

Active Member
Licensed User
Longtime User
Do you mean create an image instead of loading one in from a file? You can initialize a bitmap with InitializeMutable and attach it to the imageview.
B4X:
Sub Globals
   'These global variables will be redeclared each time the activity is created.
   'These variables can only be accessed from this module.
   Dim imvMyImageView As ImageView
   Dim bmpMyBitmap As Bitmap

End Sub

Sub Activity_Create(FirstTime As Boolean)
   'Do not forget to load the layout file created with the visual designer. For example:
   'Activity.LoadLayout("Layout1")
   imvMyImageView.Initialize("IV") 'initialize the imageview
   bmpMyBitmap.InitializeMutable(128,128) 'initialize the bitmap with size of 128 x 128
   imvMyImageView.Bitmap = bmpMyBitmap 'attach the bitmap to the imageview
   Activity.AddView(imvMyImageView,0,0,128,128) 'attach the imageview to the activity

End Sub
 
Upvote 0

gjoisa

Active Member
Licensed User
Longtime User
how to store an empty image in database and how to retrieve that empty image?
 
Upvote 0

gjoisa

Active Member
Licensed User
Longtime User
In my database table i am having image column. if the user selects the image then that image will be stored in that column. my question is how store the image if the user has not selected it..
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…