Sdílet prostřednictvím


Html.IImageGetter.GetDrawable(String) Method

Definition

This method is called when the HTML parser encounters an <img> tag.

[Android.Runtime.Register("getDrawable", "(Ljava/lang/String;)Landroid/graphics/drawable/Drawable;", "GetGetDrawable_Ljava_lang_String_Handler:Android.Text.Html/IImageGetterInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Graphics.Drawables.Drawable? GetDrawable (string? source);
[<Android.Runtime.Register("getDrawable", "(Ljava/lang/String;)Landroid/graphics/drawable/Drawable;", "GetGetDrawable_Ljava_lang_String_Handler:Android.Text.Html/IImageGetterInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member GetDrawable : string -> Android.Graphics.Drawables.Drawable

Parameters

source
String

Returns

Attributes

Remarks

This method is called when the HTML parser encounters an &lt;img&gt; tag. The source argument is the string from the "src" attribute; the return value should be a Drawable representation of the image or null for a generic replacement image. Make sure you call setBounds() on your Drawable if it doesn't already have its bounds set.

Java documentation for android.text.Html.ImageGetter.getDrawable(java.lang.String).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to