Ajay Sharma
Ajay Sharma

Reputation: 2881

Nested scrollview not working below lollipop in Xamarin Forms

I have created Custom ListView in Xamarin Forms. This list view is inside scrollview. It is working in Iphone but not working for below Lollipop in Android.

enter image description here

Upvotes: 0

Views: 902

Answers (1)

Timo Salomäki
Timo Salomäki

Reputation: 7189

Unfortunately, it's not that straightforward to enable support for pre-Lollipop devices. You will need to turn to support libraries. Instead of ScrollView, you'll want to use NestedScrollView. From there you'll have access to NestedScrollingParent and NestedScrollingChild that you'll need to use. Refer to the documentation for a description of what they do.

For the ListView, you should use NestedScrollingChildHelper to make it work correctly inside the NestedScrollView.

Edit: You can find the NestedScrollView from Android.Support.V4.Widget.NestedScrollView. Since you're using a custom renderer, you can replace the original ListView with NestedScrollView for all pre-Lollipop devices.

Upvotes: 1

Related Questions