New layout for ListView - Custom?

I came up with the idea of ​​creating a universal custom layout for ListView. After selecting Custom Layout, the ListView transforms into a container into which we can move h/v arrangements and views such as Button, Label, CheckBox, Switch, TextBox, Slider, and Image. We can customize the appearance, color, and alignment of views.

I also added a data editor in the designer.

In the block editor, data is added as dictionaries.

By changing the state of views that have it, the data updates automatically and continuously.

What do you think about this version of the layout?

1 Like

Sounds good. What about an async method for images to minimise lag/drag when scrolling...

I saw that someone recently implemented a fix for ListView image caching. But I haven't tested it. Other layouts take advantage of this, so I might do the same for this layout.

Yes, I see that the fix uses the android.util.LruCache class to tag loaded images. But it's not yet implemented in the working version of AppInventor. I can also make it so that if you set the image to a size of, for example, 200x200, the loaded image will be reduced to these dimensions.

1 Like

I am seeing huge performance improvements elsewhere with custom listviews or recycler views, or dynamic components when using async, but the native listview is laggy without it.

Listview test with 2000 images downloaded from the Internet, from the page you showed in another topic.

Is this with your async fix ?

Would prefer aia (you can send by PM, if you prefer)

To be able to compile the project with my fix, you would need to run a server locally with my fixes.

I tried using cloudflare to share my local app inventor server but it's not working properly.

Yes, sorry, didn't think that one through. Not to worry.

That is all very quick, a game changer for the listview, along with your other customisations.