ImageSpan.Drawable Property
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.
Gets a drawable for this span.
public override Android.Graphics.Drawables.Drawable? Drawable { [Android.Runtime.Register("getDrawable", "()Landroid/graphics/drawable/Drawable;", "GetGetDrawableHandler")] get; }
[<get: Android.Runtime.Register("getDrawable", "()Landroid/graphics/drawable/Drawable;", "GetGetDrawableHandler")>]
member this.Drawable : Android.Graphics.Drawables.Drawable
Property Value
A drawable for this span. For a span created from a content URI or resource ID, each call attempts to load a drawable, so the result might not be the instance that the span draws. This can be null if the drawable cannot be loaded from the content URI or resource.
- Attributes
Remarks
Returns the drawable that the constructor stored (the supplied drawable, or a BitmapDrawable created from the supplied bitmap). Otherwise, loads a drawable from the content URI or resource ID and sets its bounds to its intrinsic size. If opening the content URI or loading the resource throws an exception, returns null. If the content URI opens but cannot be decoded, the result is a BitmapDrawable with no bitmap.
The dimensions of the drawable must be the same from each call to the next.
Android reference for android.text.style.ImageSpan.getDrawable.
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.