我正在开发Android Xamarin项目,我需要使用android.support.v4.widget.NestedScrollView。我有一个视图,我通过LayoutInflator.Inflate
进行膨胀,但返回的类型是FrameLayout
类型,而不是Android.Support.V4.Widget.NestedScrollView
,这意味着我无法将其转换为正确的类型并访问{ {1}} ScrollView
等方法。
膨胀视图的SmoothScrollTo
为ToString
所以我知道在某种程度上正在创建正确的视图。
我做错了吗?这可能是一个Xamarin错误吗?
根据请求查看XML片段:
android.support.v4.widget.NestedScrollView{27428a48 VFED.... .......D 1080,0-2160,1551}
查看通胀代码:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
..snip..
</android.support.v4.widget.NestedScrollView>