Listview cannot be correctly displayed in a vertical stacklayout


#1

please refer the code on https://play.nativescript.org/?template=play-js&id=Uab900

The list view disappears if change <StackLayout orientation="horizontal"> in line 4 of xml file to “vertical”

Please advise, Thank you.

versions:
nativescript : 3.2.0
nativescript-pro-ui:3.3.0


#2

I don’t actually see it disappearing, but I noticed it kept relayout may be because of the percentage height and width inside template. I think moving the height configuration to ListView instead of template gives desired results?


#3

perfect, it is exactly what I need. Thank you very much.


#4

Hi manojdcoder,

How do you observe it kept relayout?
I replace the img source( in XML line 16) to an URL and images gone.
Any hint how to adjust percentage height and width inside template?

https://play.nativescript.org/?template=play-js&id=Uab900&v=3

Thanks.


#5

I’m able to still see the images in your updated example.

If you want to adjust width and height, you can directly set height of RadListView in percentage, to set the template width - get the device width and calculate the required width set it in pixels.