On Apr 4, 2012, at 7:49 PM, psryland wrote:
> Is there a way to access the second overload perhaps with a little JNI voodoo?
Unfortunately it wasn't exposed because we're not currently binding the
org.xml.sax.XMLReader interface, which prevents binding the Html.TagHandler
interface.
If you don't need the Html.TagHandler interface, then you can hand-bind the
fromHtml method you want (untested):
IntPtr Html = JNIEnv.FindClass(typeof(Html));
IntPtr fromHtml = JNIEnv.GetStaticMethodID(
Html,
"fromHtml",
"(Ljava/lang/String;Landroid/text/Html$ImageGetter;Landroid/text/Html$TagHandler;)Landroid/text/Spanned;");
IntPtr r = JNIEnv.CallStaticObjectMethod(
Html,
fromHtml,
new JValue(source), new JValue(IntPtr.Zero), new
JValue(IntPtr.Zero));
JNIEnv.DeleteGlobalRef (Html);
var spanned = Java.Lang.Object.GetObject<Android.Text.ISpanned>(r,
JniHandleOwnership.TransferLocalRef);
See also:
http://docs.xamarin.com/android/advanced_topics/Binding_Android_Types#Looking_up_Java_Types
http://docs.xamarin.com/android/advanced_topics/Binding_Android_Types#Static_Methods
http://docs.xamarin.com/android/advanced_topics/Binding_Android_Types#Type_References
http://docs.xamarin.com/android/advanced_topics/Binding_Android_Types#Using_Java.Lang.Object.GetObject.3cT.3e()
- Jon
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid