Html.IImageGetter.GetDrawable(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 <img> 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.