Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

In Android, ScrollView below StackLayout scrolls into above StackLayout

$
0
0

I have the following XAML:

<ContentPage
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    x:Class="XamarinFormsZIndexError.ErrorPage"
    BackgroundColor="White"
    Title="Work It">
    <ContentPage.Content>
        <StackLayout Spacing="0">
            <StackLayout Spacing="0" VerticalOptions="Start">
                <Label Text="Hi, this text will show under other content" BackgroundColor="Blue" TextColor="Yellow" />
            </StackLayout>
            <ScrollView VerticalOptions="FillAndExpand" IsClippedToBounds="true">
                <StackLayout Spacing="0">
                    <StackLayout Padding="15,100" Orientation="Horizontal">
                        <Label Text="Task" Font="Bold,Large" YAlign="Center" TextColor="Gray" HorizontalOptions="FillAndExpand" />
                    </StackLayout>
                    <StackLayout Padding="15,100" Orientation="Horizontal">
                        <Label Text="Task" Font="Bold,Large" YAlign="Center" TextColor="Gray" HorizontalOptions="FillAndExpand" />
                    </StackLayout>
                    <StackLayout Padding="15,100" Orientation="Horizontal">
                        <Label Text="Task" Font="Bold,Large" YAlign="Center" TextColor="Gray" HorizontalOptions="FillAndExpand" />
                    </StackLayout>
                    <StackLayout Padding="15,100" Orientation="Horizontal">
                        <Label Text="Task" Font="Bold,Large" YAlign="Center" TextColor="Gray" HorizontalOptions="FillAndExpand" />
                    </StackLayout>
                    <StackLayout Padding="15,100" Orientation="Horizontal">
                        <Label Text="Task" Font="Bold,Large" YAlign="Center" TextColor="Gray" HorizontalOptions="FillAndExpand" />
                    </StackLayout>
                </StackLayout>
            </ScrollView>
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

When running this (this only occurs in Android), the scrolled text appears on top of the first stack layout. Anybody seen this before? Any suggestions for a workaround?


Viewing all articles
Browse latest Browse all 58056

Trending Articles