How do you set an activity background image? Say i have a JPG image and i want it to load as an activity background.
I did it manually through the layout editor using an imageview, but the problem is i want to have a background before the layout loads, so when i use the slide itll keep the same background without moving.
I guess techknight forgot to thank u in all the excitement of finding a solution. If he allows me, I will thank you - it took me a while to unravel this issue - and you had the answer all along...
Is there any way to set the activity background to an image file at Compile time rather than run time. I recall in VB6 you could add a background image to a form and that background was saved as part of the compiled EXE eliminating the need to have to load a background image at run-time.
Just wondering if that capability exists in B4A.
Thanks!
You can create a new Layout file in the designer or modify one you already have. In the designer select Activity, then change the ColorDrawable to BitmapDrawable. In the right pane, click Add and select your file. Next select ImageFile and select the image you just added. See Attached:
You can create a new Layout file in the designer or modify one you already have. In the designer select Activity, then change the ColorDrawable to BitmapDrawable. In the right pane, click Add and select your file. Next select ImageFile and select the image you just added. See Attached:
I know this is an old thread but, ... I now find I need the user to be able to change the background image.
This means changing the image programatically from the main acttivity. Any clues how I can achieve this?
Regards Roger
Thanks Margret,
Writing the question focused the brains cells and the answer came to me. Thanks for listening