java.lang.Object | ||
↳ | android.graphics.drawable.Drawable | |
↳ | com.facebook.drawee.drawable.RoundedColorDrawable |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
RoundedColorDrawable(int color)
Creates a RoundedColorDrawable.
| |||||||||||
RoundedColorDrawable(float[] radii, int color)
Creates a new instance of RoundedColorDrawable.
| |||||||||||
RoundedColorDrawable(float radius, int color)
Creates a new instance of RoundedColorDrawable.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | draw(Canvas canvas) | ||||||||||
static RoundedColorDrawable |
fromColorDrawable(ColorDrawable colorDrawable)
Creates a new instance of RoundedColorDrawable from the given ColorDrawable.
| ||||||||||
int |
getAlpha()
Returns the drawable's alpha value.
| ||||||||||
int |
getBorderColor()
Gets the border color.
| ||||||||||
float |
getBorderWidth()
Gets the border width.
| ||||||||||
int |
getColor()
Gets the color.
| ||||||||||
int |
getOpacity()
Returns the opacity of the final color which would be used for drawing.
| ||||||||||
float |
getPadding()
Gets the padding.
| ||||||||||
boolean |
getPaintFilterBitmap()
Gets whether to set FILTER_BITMAP_FLAG flag to Paint.
| ||||||||||
float[] |
getRadii()
Gets the radii.
| ||||||||||
boolean |
getScaleDownInsideBorders()
Gets whether image should be scaled down inside borders.
| ||||||||||
boolean |
isCircle()
Returns whether or not this drawable rounds as circle.
| ||||||||||
void |
setAlpha(int alpha)
Sets the drawable's alpha value.
| ||||||||||
void |
setBorder(int color, float width)
Sets the border
| ||||||||||
void |
setCircle(boolean isCircle)
Sets whether to round as circle.
| ||||||||||
void |
setColor(int color)
Sets the color.
| ||||||||||
void |
setColorFilter(ColorFilter colorFilter)
Setting a color filter on a ColorDrawable has no effect.
| ||||||||||
void | setPadding(float padding) | ||||||||||
void |
setPaintFilterBitmap(boolean paintFilterBitmap)
Sets FILTER_BITMAP_FLAG flag to Paint.
| ||||||||||
void |
setRadii(float[] radii)
Sets the rounding radii.
| ||||||||||
void |
setRadius(float radius)
Sets the rounding radius.
| ||||||||||
void |
setScaleDownInsideBorders(boolean scaleDownInsideBorders)
Sets whether image should be scaled down inside borders.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | onBoundsChange(Rect bounds) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.graphics.drawable.Drawable
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.facebook.drawee.drawable.Rounded
|
Creates a RoundedColorDrawable.
color | of the drawable |
---|
Creates a new instance of RoundedColorDrawable.
radii | Each corner receive two radius values [X, Y]. The corners are ordered top-left, top-right, bottom-right, bottom-left. |
---|---|
color | of the drawable |
Creates a new instance of RoundedColorDrawable.
radius | of the corners in pixels |
---|---|
color | of the drawable |
Creates a new instance of RoundedColorDrawable from the given ColorDrawable.
colorDrawable | color drawable to extract the color from |
---|
Returns the drawable's alpha value.
Gets the border color.
Gets the border width.
Gets the color.
Returns the opacity of the final color which would be used for drawing. This has been inspired by Android ColorDrawable.
Gets the padding.
Gets whether to set FILTER_BITMAP_FLAG flag to Paint.
Gets the radii.
Gets whether image should be scaled down inside borders.
Returns whether or not this drawable rounds as circle.
Sets the drawable's alpha value.
alpha | The alpha value to set, between 0 and 255. |
---|
Sets the border
color | of the border |
---|---|
width | of the border |
Sets whether to round as circle.
isCircle | whether or not to round as circle |
---|
Sets the color.
Setting a color filter on a ColorDrawable has no effect. This has been inspired by Android ColorDrawable.
colorFilter | Ignore. |
---|
Sets FILTER_BITMAP_FLAG flag to Paint. FILTER_BITMAP_FLAG
This should generally be on when drawing bitmaps, unless performance-bound (rendering to software canvas) or preferring pixelation artifacts to blurriness when scaling significantly.
paintFilterBitmap | whether to set FILTER_BITMAP_FLAG flag to Paint. |
---|
Sets the rounding radii.
radii | Each corner receive two radius values [X, Y]. The corners are ordered top-left, top-right, bottom-right, bottom-left |
---|
Sets the rounding radius.
Sets whether image should be scaled down inside borders.