[global::Android.Runtime.Register (“com/vanniktech/emoji/EmojiReplacer”, DoNotGenerateAcw=true)]
inside class IEmojiReplacerInvoker : international::Java.Lang.Object, IEmojiReplacer
static IntPtr java_class_ref = JNIEnv.FindClass (“com/vanniktech/emoji/EmojiReplacer”);
protected override IntPtr ThresholdClass
get return class_ref;
protected override international::System.Sort ThresholdType
get return typeof (IEmojiReplacerInvoker);
IntPtr class_ref;
static IntPtr Validate (IntPtr deal with)
if (!JNIEnv.IsInstanceOf (deal with, java_class_ref))
throw new InvalidCastException (string.Format (“Unable to transform occasion of sort ‘0’ to sort ‘1’.”,
JNIEnv.GetClassNameFromInstance (deal with), “com.vanniktech.emoji.EmojiReplacer”));
return deal with;
protected override void Dispose (bool disposing)
if (this.class_ref != IntPtr.Zero)
JNIEnv.DeleteGlobalRef (this.class_ref);
this.class_ref = IntPtr.Zero;
base.Dispose (disposing);
public IEmojiReplacerInvoker(IntPtr deal with, JniHandleOwnership switch) : base (Validate (deal with), switch)
IntPtr local_ref = JNIEnv.GetObjectClass (((international::Java.Lang.Object) this).Deal with);
this.class_ref = JNIEnv.NewGlobalRef (local_ref);
JNIEnv.DeleteLocalRef (local_ref);
static IntPtr _replaceWithImagesMethodPointer;
[Register (“replaceWithImages”, “(Landroid/content/Context;Landroid/text/Spannable;FFLcom/vanniktech/emoji/EmojiReplacer;)V”, “”)]
public digital unsafe void ReplaceWithImages(Context context, ISpannable textual content, float emojiSize, float defaultEmojiSize,
IEmojiReplacer fallback)
if (_replaceWithImagesMethodPointer == IntPtr.Zero)
_replaceWithImagesMethodPointer = JNIEnv.GetStaticMethodID (class_ref, “replaceWithImages”, “(Lcom/vanniktech/emoji/EmojiReplacer;)V”);
strive
JValue* __args = stackalloc JValue[5];
__args[0] = new JValue(context);
__args[1] = new JValue(textual content);
__args[2] = new JValue(emojiSize);
__args[3] = new JValue(defaultEmojiSize);
__args[4] = new JValue(fallback);
JNIEnv.CallVoidMethod((this).Deal with, _replaceWithImagesMethodPointer, __args);
lastly
#Superior #Xamarin #Bindings #Case #Examine #Android #Half #Insane #Labs