Interface 如何在Xamarin中实现InfoWindowAdapter接口?

Interface 如何在Xamarin中实现InfoWindowAdapter接口?,interface,xamarin,google-maps-android-api-2,android-adapter,implements,Interface,Xamarin,Google Maps Android Api 2,Android Adapter,Implements,我正在使用Xamarin,我想创建一个CustomWindowAdapter,它实现了GoogleMap.InfoWindowAdapter接口 到目前为止,我已经尝试过: public class CustomWindowAdapter : InfoWindowAdapter { } 我得到这个错误: 错误CS0246:找不到类型或命名空间名称“InfoWindowAdapter”(是否缺少using指令或程序集引用?) 以下是接口的文档: 能给我一些帮助吗 我需要使用什么使用语句 提前感

我正在使用Xamarin,我想创建一个CustomWindowAdapter,它实现了GoogleMap.InfoWindowAdapter接口

到目前为止,我已经尝试过:

public class CustomWindowAdapter : InfoWindowAdapter
{

}
我得到这个错误:

错误CS0246:找不到类型或命名空间名称“InfoWindowAdapter”(是否缺少using指令或程序集引用?)

以下是接口的文档:

能给我一些帮助吗

我需要使用什么使用语句


提前感谢

步骤1:从组件商店获取Google Play Services组件

步骤2:实现GoogleMap.iInfo WindowAdapter

using Android.Gms.Maps;
using Android.Gms.Maps.Model;
using Android.Views;

public class InfoWindow : Java.Lang.Object, GoogleMap.IInfoWindowAdapter
{
    #region IInfoWindowAdapter implementation

    public View GetInfoContents(Marker p0)
    {
        throw new NotImplementedException ();
    }

    public View GetInfoWindow(Marker p0)
    {
        throw new NotImplementedException ();
    }

    #endregion
}

步骤1:从组件商店获取Google Play服务组件

步骤2:实现GoogleMap.iInfo WindowAdapter

using Android.Gms.Maps;
using Android.Gms.Maps.Model;
using Android.Views;

public class InfoWindow : Java.Lang.Object, GoogleMap.IInfoWindowAdapter
{
    #region IInfoWindowAdapter implementation

    public View GetInfoContents(Marker p0)
    {
        throw new NotImplementedException ();
    }

    public View GetInfoWindow(Marker p0)
    {
        throw new NotImplementedException ();
    }

    #endregion
}

非常感谢。这很有效。我可以问一下您是如何找到正确的引用的吗?在C#中,接口命名约定是以I开头,其余的都在Android文档中。最重要的是找出它是接口还是抽象类,这将决定Xamarin的命名。谢谢。这很有效。我可以问一下您是如何找到正确的引用的吗?在C#中,接口命名约定是以I开头,其余的都在Android文档中。最重要的是找出它是接口还是抽象类,这将决定Xamarin的命名。