xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.62k stars 1.87k forks source link

Flexlayout does not work with scrollable like xamarin list, scrolabble v #4391

Open byrcb opened 6 years ago

byrcb commented 6 years ago

Description

ListView and Scrollable views can`t scroll to bottom when they are inside the flexlayout

Steps to Reproduce

Just only put ListView, scrollable view etc. into FlexLayout

Expected Behavior

When I scroll down to the end of the list all items should be visible. It is not possible to see all elements , some of them are cut.

Actual Behavior

I can scroll down to the end of the list and all items are visible.

Basic Information


<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="Module1.Views.MainPage"
             Title="{Binding Title}">

    <StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
        <Label Text="Welcome to Xamarin Forms and Prism!" />

        <FlexLayout>
            <ListView>
                <ListView.ItemsSource>
                    <x:Array Type="{x:Type x:String}">
                        <x:String>mono</x:String>
                        <x:String>monodroid</x:String>
                        <x:String>monotouch</x:String>
                        <x:String>monorail</x:String>
                        <x:String>monodevelop</x:String>
                        <x:String>monotone</x:String>
                        <x:String>monopoly</x:String>
                        <x:String>monomodal</x:String>
                        <x:String>mononucleosis</x:String>
                        <x:String>mono</x:String>
                        <x:String>monodroid</x:String>
                        <x:String>monotouch</x:String>
                        <x:String>monorail</x:String>
                        <x:String>monodevelop</x:String>
                        <x:String>monotone</x:String>
                        <x:String>monopoly</x:String>
                        <x:String>monomodal</x:String>
                        <x:String>mononucleosis</x:String>
                        <x:String>mono</x:String>
                        <x:String>monodroid</x:String>
                        <x:String>monotouch</x:String>
                        <x:String>monorail</x:String>
                        <x:String>monodevelop</x:String>
                        <x:String>monotone</x:String>
                        <x:String>monopoly</x:String>
                        <x:String>monomodal</x:String>
                        <x:String>mononucleosis</x:String>
                        <x:String>mono</x:String>
                        <x:String>monodroid</x:String>
                        <x:String>monotouch</x:String>
                        <x:String>monorail</x:String>
                        <x:String>monodevelop</x:String>
                        <x:String>monotone</x:String>
                        <x:String>monopoly</x:String>
                        <x:String>monomodal</x:String>
                        <x:String>mononucleosis</x:String>
                        <x:String>mono</x:String>
                        <x:String>monodroid</x:String>
                        <x:String>monotouch</x:String>
                        <x:String>monorail</x:String>
                        <x:String>monodevelop</x:String>
                        <x:String>monotone</x:String>
                        <x:String>monopoly</x:String>
                        <x:String>monomodal</x:String>
                        <x:String>mononucleosis</x:String>
                        <x:String>mono</x:String>
                        <x:String>monodroid</x:String>
                        <x:String>monotouch</x:String>
                        <x:String>monorail</x:String>
                        <x:String>monodevelop</x:String>
                        <x:String>monotone</x:String>
                        <x:String>monopoly</x:String>
                        <x:String>monomodal</x:String>
                        <x:String>mononucleosis</x:String>
                        <x:String>mono</x:String>
                        <x:String>monodroid</x:String>
                        <x:String>monotouch</x:String>
                        <x:String>monorail</x:String>
                        <x:String>monodevelop</x:String>
                        <x:String>monotone</x:String>
                        <x:String>monopoly</x:String>
                        <x:String>monomodal</x:String>
                        <x:String>mononucleosis</x:String>
                        <x:String>1</x:String>
                        <x:String>2</x:String>
                        <x:String>3</x:String>
                        <x:String>4</x:String>
                        <x:String>55</x:String>
                        <x:String>6</x:String>
                        <x:String>7</x:String>
                        <x:String>8</x:String>
                        <x:String>9</x:String>
                    </x:Array>
                </ListView.ItemsSource>
            </ListView>
        </FlexLayout>

    </StackLayout>

</ContentPage>

Module1.zip

kingces95 commented 6 years ago

Yep, can't get to the bottom...

xperseguers commented 4 years ago

In some case I've seen that part of my design is cut (FlexLayout is inside a scrollabe view, not the other way around) but much more often, my real problem is that the scrollable view can scroll too far with lots of empty space at the end: https://forums.xamarin.com/discussion/184860/problem-with-a-scrollview-having-a-flexlayout-inside-absolutelayout#latest

azrinsani commented 3 years ago

Is this still not resolved?? It's 2021

cjsharp01 commented 3 years ago

I have the same issue. Hopefully this will be fixed in MAUI if not in XF. However, it looks like a workaround might be to put the Scrollview within a StackLayout (with an expanding VerticalOptions) within a FlexLayout. I am having issues with it displaying properly but I think that is due to the webview rendering before the size is set.