我已经Here
写了图书馆Java
,Android
我已经包装到C#
Android
图书馆
里面有Java
以下代码:
@FunctionalInterface
public interface LoadSceneCallback {
void onLoadScene(@Nullable MapError var1);
}
Java
用作匿名类的代码:
mapView.getMapScene().loadScene(MapScheme.NORMAL_DAY, new MapScene.LoadSceneCallback() {
...
}
C#
包装器生成以下代码:
// Metadata.xml XPath interface reference: path="/api/package[@name='com.here.sdk.mapview']/interface[@name='MapScene.LoadSceneCallback']"
[Register ("com/here/sdk/mapview/MapScene$LoadSceneCallback", "", "Com.Here.Sdk.Mapview.MapScene/ILoadSceneCallbackInvoker")]
public partial interface ILoadSceneCallback : IJavaObject, IJavaPeerable {
// Metadata.xml XPath method reference: path="/api/package[@name='com.here.sdk.mapview']/interface[@name='MapScene.LoadSceneCallback']/method[@name='onLoadScene' and count(parameter)=1 and parameter[1][@type='com.here.sdk.mapview.MapError']]"
[Register ("onLoadScene", "(Lcom/here/sdk/mapview/MapError;)V", "GetOnLoadScene_Lcom_here_sdk_mapview_MapError_Handler:Com.Here.Sdk.Mapview.MapScene/ILoadSceneCallbackInvoker, HereApi.Android")]
void OnLoadScene (global::Com.Here.Sdk.Mapview.MapError p0);
}
实际上我不知道如何使用它......当我从它继承时,我不仅要实现void onLoadScene(@Nullable MapError var1)
,还要实现Java
方法的色调...... :(
有人面临同样的问题吗?如何使用此类生成的代码