Hi all,
I'd like to change the bakground between a couple of pictures.
I have added those file in B4A (files tab).
If I understood correctly, those file are part of the code (!)
So, Iam wondering which one of that code is the best :
or
???
Thks,
WW
I'd like to change the bakground between a couple of pictures.
I have added those file in B4A (files tab).
If I understood correctly, those file are part of the code (!)
So, Iam wondering which one of that code is the best :
B4X:
Sub AFFICHE_FOND
Dim BORDURE As Rect
Dim random As Int
random = Rnd( 1, 11 )
BKGRND.Initialize( File.DirAssets, "backgnd-" & NumberFormat( random,2,0 ) & ".jpg" )
dBKGRND.Initialize( BKGRND )
Activity.Background = dBKGRND
end sub
B4X:
dim BKGRND (11) as BitMap
BKGRND(1).Initialize( File.DirAssets, "backgnd-01.jpg" )
BKGRND(2).Initialize( File.DirAssets, "backgnd-02.jpg" )
BKGRND(3).Initialize( File.DirAssets, "backgnd-03.jpg" )
etc..
Sub AFFICHE_FOND
Dim BORDURE As Rect
Dim random As Int
random = Rnd( 1, 11 )
dBKGRND.Initialize( BKGRND( random ) )
Activity.Background = dBKGRND
end sub
???
Thks,
WW