Adding an image to listview elements

Hi, is it possible to add an image to listview elements (in the blocks - programmatically)
In the ListView design properties there is a button to add items and images which does the job but i would like to add this in the blocks so i can change the list using button or whatever in the app.

There is something in the ListView Help text mentions dictionaries but i can't find an example anywhere or any more detail. I find dictionaries a bit confusing but I will have to play more with them.

Any Ideas or links?

1 Like

Something like this:

You could develop this and fill the mainText, detailtext, imageName from lists

2 Likes

Well that was easy! (sheepish face)
I went down a rabbit hole of dictionary action.
Thank You for your speedy response!

If you right click and Do It on a .CreateElement block when running companion, you will see how it constructs a dictionary. You can, as I have shown, just add this as a list item to a list.

1 Like

That is useful thanks. I can do everything with good old lists for this one. I will do some research on the Dictionary blocks. maybe there is a tutorial including them? I will look.
Appreciate your help :slight_smile:

http://ai2.appinventor.mit.edu/reference/blocks/dictionaries.html

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.