【发布时间】:2018-10-15 12:54:59
【问题描述】:
【问题讨论】:
标签: android xamarin xamarin.android xamarin.forms
【问题讨论】:
标签: android xamarin xamarin.android xamarin.forms
很遗憾,启用对 Lollipop 之前的设备的支持并不是那么简单。您将需要转向支持库。而不是ScrollView,您需要使用NestedScrollView。从那里您可以访问您需要使用的NestedScrollingParent 和NestedScrollingChild。请参阅文档以了解它们的作用。
对于 ListView,您应该使用NestedScrollingChildHelper 使其在NestedScrollView 中正常工作。
编辑:您可以从Android.Support.V4.Widget.NestedScrollView 找到NestedScrollView。由于您使用的是自定义渲染器,因此您可以将原始的 ListView 替换为 NestedScrollView 用于所有棒棒糖之前的设备。
【讨论】:
use SetNativeControl(yourNestedScrollView); 将其设置为 Android 上的活动控件。您将在 Xamarin 的官方指南中找到更多更好的解释。