A Drawable is a general abstraction for "something that can be drawn.
See Also:
Drawable Members
Syntax
[Android.Runtime.Register("android/graphics/drawable/Drawable", DoNotGenerateAcw=true)]
public abstract class
Drawable :
Java.Lang.ObjectRemarks
A Drawable is a general abstraction for "something that can be drawn." Most
often you will deal with Drawable as the type of resource retrieved for
drawing things to the screen; the Drawable class provides a generic API for
dealing with an underlying visual resource that may take a variety of forms.
Unlike a Android.Views.View, a Drawable does not have any facility to
receive events or otherwise interact with the user.
In addition to simple drawing, Drawable provides a number of generic
mechanisms for its client to interact with what is being drawn:
Though usually not visible to the application, Drawables may take a variety
of forms:
- Bitmap: the simplest Drawable, a PNG or JPEG image.
- Nine Patch: an extension to the PNG format allows it to
specify information about how to stretch it and place things inside of
it.
- Shape: contains simple drawing commands instead of a raw
bitmap, allowing it to resize better in some cases.
- Layers: a compound drawable, which draws multiple underlying
drawables on top of each other.
- States: a compound drawable that selects one of a set of
drawables based on its state.
- Levels: a compound drawable that selects one of a set of
drawables based on its level.
- Scale: a compound drawable with a single child drawable,
whose overall size is modified based on the current level.
Developer Guides
For more information about how to use drawables, read the
Canvas and Drawables developer
guide. For information and examples of creating drawable resources (XML or bitmap files that
can be loaded in code), read the
Drawable Resources
document.
[Android Documentation]
Requirements
Namespace: Android.Graphics.Drawables
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1