在Xamarin.Form中,滚动视图嵌套在滚动视图中,在Android中的Failure内部滚动视图

时间:2017-12-14 09:43:26

标签: xamarin xamarin.forms

嵌套ScrollView无效。怎么解决?
这让我困惑了很长时间

<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>

1 个答案:

答案 0 :(得分:3)

您永远不应该将ScrollView嵌入Scrollview。这是一种非常糟糕的做法,通常会导致有趣的行为......