Automatic height in blocks (in WebView, ListView etc.)

Hello. How to set the automatic height of an element in blocks? I tried 0 and -1. -1 sets Fill Parent, and 0 causes the element to disappear.

Automatic height is -1. Fill parent is -2. In the case of WebViewer, it interprets Automatic as Fill Parent, but for every other component it will try to only take up as much space as it needs.

I’m using the ListView element. When I set the automatic height in Designer is ok. When I set the height in Blocks to -1, it extends the ListView to the entire screen. I returned the ListView height to the text label and after starting the application when ListView has an automatic height in the label shows me the value 0.

Is this how it works in ListView? Is this a error?

I have to agree with Patryk_F. After testing (in companion) if a listview is on the screen, setting a listview to height = -1 with blocks set the listview to fill parent.

Actually, it looks like this logic also applies to ListView:

Hi,
Did you found a solution ?

Hi everyone,
I tried to set listview height to automatic from the blocks so I tried to set the height to -1 but it set it to fill parent. what can I do? please help me

Android or iOS? Post the aia.

Android,
image
the block is setting the listview to fill parent and not to automatic.
I think is a bug

Do you have idea?

You can workaround by doing something like this, using combinations of these blocks:

image

If you change the number of entries, you will need to set the listview height to 0 then load the elements again.