Java android.graphics.drawable ColorDrawable fields, constructors, methods, implement or subclass

Example usage for Java android.graphics.drawable ColorDrawable fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.graphics.drawable ColorDrawable.

The text is from its open source code.

Constructor

ColorDrawable(@ColorInt int color)
Creates a new ColorDrawable with the specified color.
ColorDrawable()
Creates a new black ColorDrawable.

Method

voiddraw(Canvas canvas)
RectgetBounds()
Return the drawable's bounds Rect.
ClassgetClass()
Returns the runtime class of this Object .
intgetColor()
Gets the drawable's color value.
voidsetAlpha(int alpha)
Sets the color's alpha value.
voidsetBounds(int left, int top, int right, int bottom)
Specify a bounding rectangle for the Drawable.
voidsetBounds(@NonNull Rect bounds)
Specify a bounding rectangle for the Drawable.
voidsetColor(@ColorInt int color)
Sets the drawable's color value.
voidsetColorFilter(@ColorInt int color, @NonNull PorterDuff.Mode mode)
Specify a color and Porter-Duff mode to be the color filter for this drawable.