java.lang.Object | |||
↳ | android.graphics.drawable.Drawable | ||
↳ | com.facebook.drawee.drawable.ForwardingDrawable | ||
↳ | com.facebook.drawee.drawable.RoundedCornersDrawable |
Drawable that draws underlying drawable with rounded corners.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
enum | RoundedCornersDrawable.Type |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
RoundedCornersDrawable(Drawable drawable)
Creates a new RoundedCornersDrawable with given underlying drawable.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | draw(Canvas canvas) | ||||||||||
int |
getBorderColor()
Gets the border color.
| ||||||||||
float |
getBorderWidth()
Gets the border width.
| ||||||||||
int |
getOverlayColor()
Gets the overlay color.
| ||||||||||
float |
getPadding()
Gets the padding.
| ||||||||||
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 |
setBorder(int color, float width)
Sets the border
| ||||||||||
void |
setCircle(boolean isCircle)
Sets whether to round as circle.
| ||||||||||
void |
setOverlayColor(int overlayColor)
Sets the overlay color.
| ||||||||||
void | setPadding(float padding) | ||||||||||
void |
setRadii(float[] radii)
Sets radii values to be used for rounding.
| ||||||||||
void |
setRadius(float radius)
Sets radius to be used for rounding
| ||||||||||
void |
setScaleDownInsideBorders(boolean scaleDownInsideBorders)
Sets whether image should be scaled down inside borders.
| ||||||||||
void |
setType(RoundedCornersDrawable.Type type)
Sets the type of rounding process
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | onBoundsChange(Rect bounds) |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new RoundedCornersDrawable with given underlying drawable.
drawable | underlying drawable |
---|
Gets the border color.
Gets the border width.
Gets the overlay color.
Gets the padding.
Gets the radii.
Gets whether image should be scaled down inside borders.
Returns whether or not this drawable rounds as circle.
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 overlay color.
overlayColor | the color to filled outside the rounded corners |
---|
Sets radii values to be used for rounding. Each corner receive two radius values [X, Y]. The corners are ordered top-left, top-right, bottom-right, bottom-left
radii | Array of 8 values, 4 pairs of [X,Y] radii |
---|
Sets radius to be used for rounding
radius | corner radius in pixels |
---|
Sets whether image should be scaled down inside borders.
Sets the type of rounding process
type | type of rounding process |
---|