Kivy Update Layout (Async Download)

I have a ListView where each item has AsyncImage and Label. While loading images shows a layout with gaps between each element.

-------

Item

-------

Item 

-------

When the first interaction occurs (scrolling occurs), the layout is updated and the spaces disappear.

-------
Item    
-------  
Item 
-------

I would really like to update the layout when the image finishes loading. How to update the layout?

+2
source share
1 answer

You can usually ask a widget to update its canvas by calling widget.canvas.ask_update () .

For the layout, you can try launching the widget layout inside it by calling layout_instance.do_layout () .

+4
source

Source: https://habr.com/ru/post/1671121/


All Articles