過了一會兒,我想通了Android的這些功能:
void PolylineOptions_SetWidth(PolylineOptions obj, float width)
{
try
{
Java.Lang.Reflect.Method method = obj.Class.GetMethod("width", new Java.Lang.Class[] { Java.Lang.Float.Type });
method.Invoke(obj, new Java.Lang.Object[] { (Java.Lang.Float)(float)width });
}
catch (Java.Lang.SecurityException e)
{
// exception handling here
}
catch (Java.Lang.NoSuchMethodException e)
{
// exception handling here
}
}
void PolylineOptions_SetColor(PolylineOptions obj, int col)
{
try
{
Java.Lang.Reflect.Method method = obj.Class.GetMethod("color", new Java.Lang.Class[] { Java.Lang.Integer.Type });
method.Invoke(obj, new Java.Lang.Object[] { col });
}
catch (Java.Lang.SecurityException e)
{
// exception handling here
}
catch (Java.Lang.NoSuchMethodException e)
{
// exception handling here
}
}
void PolylineOptions_SetAlpha(PolylineOptions obj, float col)
{
try
{
Java.Lang.Reflect.Method method = obj.Class.GetMethod("alpha", new Java.Lang.Class[] { Java.Lang.Float.Type });
method.Invoke(obj, new Java.Lang.Object[] { col });
}
catch (Java.Lang.SecurityException e)
{
// exception handling here
}
catch (Java.Lang.NoSuchMethodException e)
{
// exception handling here
}
}
void Polyline_SetAlpha(Polyline obj, float col)
{
try
{
Java.Lang.Reflect.Method method = obj.Class.GetMethod("alpha", new Java.Lang.Class[] { Java.Lang.Float.Type });
method.Invoke(obj, new Java.Lang.Object[] { col });
}
catch (Java.Lang.SecurityException e)
{
// exception handling here
}
catch (Java.Lang.NoSuchMethodException e)
{
// exception handling here
}
}