Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Vertical ScrollView and horizontal ListView scrolling issues

$
0
0

Hello,

I have a vertical ScrollView with a horizontal ListView within. The horizontal ListView will not scroll vertically with the rest of the content. All content under the horizontal ListView scrolls vertically, but it scrolls behind the ListView. I would like the ListView to scroll vertically with the rest of the content. I am guessing it has something to do with the RelativeLayout used for the horizontal ListView. Any ideas on how to get around this?

Thanks in advance!
-Drew

<ScrollView 
        VerticalOptions="StartAndExpand"
        Orientation="Vertical">

        <StackLayout VerticalOptions="FillAndExpand">
            <!-- Would like this to scroll with the next StackLayout.  However, the next stack layout scrolls under this StackLayout. -->
            <StackLayout>
                <RelativeLayout HeightRequest="80">
                    <ListView
                        RelativeLayout.XConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=0.5, Constant=-40}"
                        RelativeLayout.YConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=-0.5, Constant=40}"
                        RelativeLayout.WidthConstraint="{ConstraintExpression Type=Constant, Constant=80}"
                        RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}"
                        RowHeight="80"
                        Rotation="90"
                        x:Name="lvProgramDays"
                        SeparatorVisibility="None"
                        ItemsSource="{Binding ProgramDays}">
                        <ListView.ItemTemplate>
                            <DataTemplate>
                                <ViewCell>
                                    <ContentView WidthRequest="80" HeightRequest="80"  Rotation="270">
                                        [...]
                                    </ContentView>
                                </ViewCell>
                            </DataTemplate>
                        </ListView.ItemTemplate>
                    </ListView>
                </RelativeLayout>
            </StackLayout>

            <!-- This StackLayout scrolls under the above StackLayout.   -->
            <StackLayout 
                VerticalOptions="FillAndExpand"
                Orientation="Vertical">
                <ListView 
                    HasUnevenRows="True"
                    SeparatorVisibility="None">
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <ViewCell>
                                [...]
                            </ViewCell>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>
            </StackLayout>
        </StackLayout>
    </ScrollView>

Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>