Xamarin:android.support.v4.widget.NestedScrollView和Inflate没有返回正确的类型

时间:2015-10-08 11:51:09

标签: c# xamarin nestedscrollview

我正在开发Android Xamarin项目,我需要使用android.support.v4.widget.NestedScrollView。我有一个视图,我通过LayoutInflator.Inflate进行膨胀,但返回的类型是FrameLayout类型,而不是Android.Support.V4.Widget.NestedScrollView,这意味着我无法将其转换为正确的类型并访问{ {1}} ScrollView等方法。

膨胀视图的SmoothScrollToToString所以我知道在某种程度上正在创建正确的视图。

我做错了吗?这可能是一个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>

0 个答案:

没有答案