姜滕圣
姜滕圣

Reputation: 29

In Xamarin.Form a scrollview nested in a scrollview, scrollview inside Failure in Android

Nested ScrollView is not working. How to solve it?
It confuses me for a long time

<ScrollView  x:Name="parentScrollView" Grid.Row="1">
    <StackLayout>
        <AbsoluteLayout VerticalOptions="FillAndExpand" Margin="0,-8,0,0">
            <AbsoluteLayout AbsoluteLayout.LayoutBounds="0,0,1,1" AbsoluteLayout.LayoutFlags="All">
                <AbsoluteLayout x:Name="scrollAbsoluteLayout">
                    <ScrollView x:Name="scrollView">
                        <Label x:Name="contentText" FontSize="20" TextColor="{x:Static local:UIColorConfigs.Compliment_text_color}" Margin="35,10,103,0">
                            <Label.FontFamily>
                                <OnPlatform x:TypeArguments="x:String" iOS="segoescb" Android="segoescb.ttf#segoescb" />
                            </Label.FontFamily>
                        </Label>
                    </ScrollView>
                </AbsoluteLayout>
            </AbsoluteLayout>
        </AbsoluteLayout>
    </StackLayout>
</ScrollView>

Upvotes: 0

Views: 1650

Answers (1)

TaiT&#39;s
TaiT&#39;s

Reputation: 3216

You should never nest a ScrollView into a Scrollview. It's a very bad practice which usually leads to funny behaviors...

Upvotes: 4

Related Questions