I'm trying to create a NinePatch image programmatically by using the code found at: https://gist.github.com/briangriffey/4391807
When doing:
NinePatch patch = new NinePatch(bitmap, buffer.ToArray<byte>(), srcName);
I'm getting an error saying:
System.InvalidCastException: Unable to cast from 'java/nio/ByteArrayBuffer' to '[B'.
Can anyone help me with this error?