I want to have many pictures on my android.

mrussell014

Member
Licensed User
Longtime User
I want to have many pictures on my android. This is so I can change a group of backgrounds each time it is clicked. First what is the limit B4A will let me load as png. Can I use another Dir lib other than file. Is "SetBackgroundImage(LoadBitmap(File.DirAssets,Etc" the only way to load this png image. I would like to use sqlite to store and pull the .png pictures into the background. I been browsing these posts and not finding any other way to to load background images. Any suggestions
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
First what is the limit B4A will let me load as png.
Basic4android doesn't impose any limit.

I would like to use sqlite to store and pull the .png pictures into the background.
There is such an example in the SQL tutorial.
Basic4android Search: SQL Tutorial

Note that you should use LoadBitmapSample if the images are larger than the screen size (to save memory).
 
Upvote 0

mrussell014

Member
Licensed User
Longtime User
Thanks Erel,
How do you handle so many questions from stumbling coders like me.

anyway my real delema is how to set the back ground using words and image from a table. I could not find anyway to set a button background without using the following code. I should look at a tictactoe program and see what they are doing.
the following is the code that works but I can find how to get my sql pic to be set in the background of the button.
Button1.Text="AnyWord"
Button1.SetBackgroundImage(LoadBitmap(File.DirAssets, "AnyPic.png"))

The tempature is getting over 100. airconditioning not keeping up with outside heat so I will shutdown now until the temp drops or I take my laptop to a coffee house.

Basic4android doesn't impose any limit.


There is such an example in the SQL tutorial.
Basic4android Search: SQL Tutorial

Note that you should use LoadBitmapSample if the images are larger than the screen size (to save memory).
 
Upvote 0
Top