[Vuejs]-Nativescript ScrollView not scrolling

2👍

ScrollView (or anything that’s descendent of ContentView like Page) can have only one child element.

In your example, the moment you add the second StackLayout the first StackLayout in ScrollView will be replaced. You will have to stack your items in the first StackLayout.

👤Manoj

2👍

<GridLayout rows="300,*" columns="*">
        <ScrollView height="300" orientation="vertical">
    <StackLayout orientation="horizontal" horizontalAlignment="center" row="0" col="0" style="background-color:rgb(200,200,200);">

            <StackLayout orientation="horizontal" horizontalAlignment="center"
                style="width:50%; height:400; background-color:red;"></StackLayout>
            <StackLayout orientation="horizontal" horizontalAlignment="left"
                style="width:50%; height:400; background-color:yellow;"></StackLayout>
    </StackLayout>
</ScrollView>

    <FlexBoxLayout row="1" col="0"
        style="width:100%; height:80; align-items:center; justify-content:space-around; background-color:white;">
    </FlexBoxLayout>
</GridLayout>

Would provide the following result[1]: https://i.stack.imgur.com/m4TAG.png

I’m not sure whether you can have ScrollView as a row of GridLayout, you should use any Layout instead. Plus you cannot have px unit for height and width. Plus whenever using StackLayout use ‘orientation’ and ‘alignment’ properties.

Leave a comment