-
-
Method Summary
Modifier and Type Method Description final CorneredShaperoundedCornerShape(Integer allPercent)Creates a Shape with all corners rounded. final CorneredShaperoundedCornerShape(Integer topLeftPercent, Integer topRightPercent, Integer bottomRightPercent, Integer bottomLeftPercent)Creates a Shape with all corners rounded. final CorneredShapecutCornerShape(Integer allPercent)Creates a Shape with all corners cut. final CorneredShapecutCornerShape(Integer topLeftPercent, Integer topRightPercent, Integer bottomRightPercent, Integer bottomLeftPercent)Creates a Shape with all corners cut. final ShapedrawableShape(Drawable drawable, Boolean tintDrawable, Boolean keepAspectRatio, Shape otherShape)Creates a Shape out of a Drawable. final CorneredShapegetPillShape()A shape whose each corner is fully rounded. final ShapegetRectShape()A rectangle with sharp corners. -
-
Method Detail
-
roundedCornerShape
final CorneredShape roundedCornerShape(Integer allPercent)
Creates a Shape with all corners rounded.
- Parameters:
allPercent- the radius of each corner (in percent).
-
roundedCornerShape
final CorneredShape roundedCornerShape(Integer topLeftPercent, Integer topRightPercent, Integer bottomRightPercent, Integer bottomLeftPercent)
Creates a Shape with all corners rounded.
- Parameters:
topLeftPercent- the top-left corner radius (in percent).topRightPercent- the top-right corner radius (in percent).bottomRightPercent- the bottom-right corner radius (in percent).bottomLeftPercent- the bottom-left corner radius (in percent).
-
cutCornerShape
final CorneredShape cutCornerShape(Integer allPercent)
Creates a Shape with all corners cut.
- Parameters:
allPercent- the radius of each corner (in percent).
-
cutCornerShape
final CorneredShape cutCornerShape(Integer topLeftPercent, Integer topRightPercent, Integer bottomRightPercent, Integer bottomLeftPercent)
Creates a Shape with all corners cut.
- Parameters:
topLeftPercent- the top-left corner radius (in percent).topRightPercent- the top-right corner radius (in percent).bottomRightPercent- the bottom-right corner radius (in percent).bottomLeftPercent- the bottom-left corner radius (in percent).
-
drawableShape
final Shape drawableShape(Drawable drawable, Boolean tintDrawable, Boolean keepAspectRatio, Shape otherShape)
-
getPillShape
final CorneredShape getPillShape()
A shape whose each corner is fully rounded.
-
getRectShape
final Shape getRectShape()
A rectangle with sharp corners.
-
-
-
-