Xamarin Builds a ListView Inside a ScrollView Task

My Xamarin forms application has several ListView controls inside ScrollView. But in android, scrolling does not work for ListView. Is there an alternative solution?

+6
source share
6 answers

SHOULD NOT include ListViews in ScrollView, as the system will confuse the scrolling behavior of the two. You should redo your page with this in mind.

Example: 1) Use ListViews inside StackLayout 2) Use TableViews inside ScrollView

+8
source

"NestedScrollingEnabled" true . xamarin "NestedScrollingEnabled" true

    protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.ListView> e)
    {
        base.OnElementChanged(e);

        if (e.NewElement != null)
        {
            var listView = this.Control as Android.Widget.ListView;
            listView.NestedScrollingEnabled = true;               
        }            
    }
+8

ListView , ScrollView.

ScrollView, , , ( ), StackLayout ScrollView

ListView, , ListView ScrollView

+3

?

0

,

0

I have done some work here .

0
source

All Articles