I think there's a new update to this.
What is a background picker selection?
perhaps
or if you want to do the coding yourself:
To change an app's background using a selection in MIT App Inventor, use the ListPicker (for a text list of colors or image names) or ImagePicker (to pick an image file from your device) combined with an AfterPicking event block. [1, 2, 3]
Steps to Change Background with a ListPicker (Colors)
-
Designer Window:
-
Drag a
ListPickeronto your screen. Change its text to"Select Background Color". -
In the
ListPickerproperties, set theElementsFromStringproperty to a comma-separated list of colors, such asRed, Blue, Green, White. [1]
-
-
Blocks Window:
-
Find your
ListPickerin the blocks drawer and drag thewhen ListPicker1.AfterPicking doevent block. -
Inside that event, add a block to set your screen's background (
set Screen1.BackgroundColor to). -
Use an
if-elselogic block orevacuate/evaluateto matchListPicker1.Selectionto actual color blocks:
-
Steps to Change Background with an ImagePicker (Images)
-
Designer Window:
- Drag an
ImagePickeronto your screen.
- Drag an
-
Blocks Window:
-
Drag the
when ImagePicker1.AfterPicking doevent block. -
Add a block to set the background image:
set Screen1.BackgroundImage to(orCanvas1.BackgroundImage). -
Plug the
ImagePicker1.Selectionblock directly into the value slot. (Note: Ensure your File Scope is set correctly in Screen properties if testing on newer Android versions
-
So "background" not "background" ? ![]()