listviewxamarin.formsabsolutelayout

Xamarin forms: Absolute Layout Listview Scrolling is not working


I have a listview inside an AbsoluteLayout and my problem is listview scrolling is not working.

Please see the below screenshot of code:

enter image description here

And the output screen is like below:

enter image description here

I have added AbsoluteLayout for putting the Imagebutton on top of Listview. If I cover the AbsoluteLayout with a scrollview, then scrolling works, but the Imagebutton is not showing on top of Listview. It is placed on the bottom after listview items.

Please suggest a solution for this, Thanks.


Solution

  • You could warp the ListView only with the ScrollView and put the ScrollView in the AbsoluteLayout .

    <AbsoluteLayout>
        <ScrollView AbsoluteLayout.LayoutFlags="All" AbsoluteLayout.LayoutBounds="0,0,1,1">
            <ListView >
                //...
            </ListView>
        </ScrollView>
       //...other control 
    </AbsoluteLayout>