Android Guides | Samples

Android.Graphics.Drawables Namespace

Provides classes to manage a variety of visual elements that are intended for display only, such as bitmaps and gradients.

Remarks

Provides classes to manage a variety of visual elements that are intended for display only, such as bitmaps and gradients. These elements are often used by widgets as background images or simply as indicators (for example, a volume level indicator).

You can create most of these drawables using XML, as described in Drawable Resources.

Classes

TypeReason
AnimatedStateListDrawableDrawable containing a set of Drawable keyframes where the currently displayed keyframe is chosen based on the current state set.
AnimatedVectorDrawableThis class uses ObjectAnimator and AnimatorSet to animate the properties of a VectorDrawable to create an animated drawable.
AnimationDrawableAn object used to create frame-by-frame animations, defined by a series of Drawable objects, which can be used as a View object's background.
BitmapDrawableA Drawable that wraps a bitmap and can be tiled, stretched, or aligned.
ClipDrawableA Drawable that clips another Drawable based on this Drawable's current level value.
ClipDrawableOrientationEnumerates values returned by several types and taken as a parameter of the Android.Graphics.Drawables.ClipDrawable..ctor member.
ColorDrawableA specialized Drawable that fills the Canvas with a specified color.
DrawableA Drawable is a general abstraction for "something that can be drawn.
Drawable+ConstantStateThis abstract class is used by Drawables to store shared constant state and data between Drawables.
Drawable+ICallbackImplement this interface if you want to create an animated drawable that extends Drawable.
DrawableContainerA helper class that contains several Drawables and selects which one to use.
DrawableContainer+DrawableContainerStateA ConstantState that can contain several Drawables.
GradientDrawableA Drawable with a color gradient for buttons, backgrounds, etc.
GradientDrawable+OrientationControls how the gradient is oriented relative to the drawable's bounds
GradientTypeEnumerates values returned by the GradientType.LinearGradient, GradientType.RadialGradient, and GradientType.SweepGradient members and taken as a parameter of the GradientDrawable.SetGradientType member.
IAnimatableInterface that drawables supporting animations should implement.
InsetDrawableA Drawable that insets another Drawable by a specified distance.
LayerDrawableA Drawable that manages an array of other Drawables.
LayerDrawablePaddingModeEnumerates values returned by several types.
LevelListDrawableA resource that manages a number of alternate Drawables, each assigned a maximum numerical value.
NinePatchDrawableA resizeable bitmap, with stretchable areas that you define.
PaintDrawableDrawable that draws its bounds in the given paint, with optional rounded corners.
PictureDrawableDrawable subclass that wraps a Picture, allowing the picture to be used wherever a Drawable is supported.
RippleDrawableDrawable that shows a ripple effect in response to state changes.
RotateDrawable
ScaleDrawableA Drawable that changes the size of another Drawable based on its current level value.
ShapeDrawableA Drawable object that draws primitive shapes.
ShapeDrawable+ShaderFactoryBase class defines a factory object that is called each time the drawable is resized (has a new width or height).
ShapeTypeEnumerates values returned by several methods of ShapeType and taken as a parameter of the GradientDrawable.SetShape member.
StateListDrawableLets you assign a number of graphic images to a single Drawable and swap out the visible item by a string ID value.
TransitionDrawableAn extension of LayerDrawables that is intended to cross-fade between the first and second layer.
VectorDrawableThis lets you create a drawable based on an XML vector graphic.