In java I have the enum
package com.acme.common;
// In java world
public enum FooEnum {
AValue,
AnotherValue
}
This is used throughout the code in Java, e.g.
// In java world
public class Bar {
void setFoo(FooEnum value) {
// ...
}
}
This is getting mapped to a class in C# which inherits Java.Lang.Enum as follows:
// Now in C# generated bindings
// I want this to be a CLR Enum instead
public sealed partial class FooEnum : global::Java.Lang.Enum
{
// ...
}
// C# generated class uses Java.Lang.Enum type for getter and setter
// But I want FooEnum to be clr enum
public partial class Bar
{
public FooEnum Foo { get; set; }
}
I would like to map this to a C# enum instead using the EnumFields.xml, but no idea how to.
I googled Xamarin Android EnumFields and found a few results, and have read the Xamarin Android Binding walthrough but still not sure quite how to do this ...