-
public class RoundedDrawable extends Drawable
-
-
Field Summary
Fields Modifier and Type Field Description public final static intDEFAULT_BORDER_COLOR
-
Constructor Summary
Constructors Constructor Description RoundedDrawable(Bitmap bitmap)
-
Method Summary
-
Methods inherited from class android.graphics.drawable.Drawable
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, draw, getAlpha, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getIntrinsicHeight, getIntrinsicWidth, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpacity, getOpticalInsets, getOutline, getPadding, getState, getTransparentRegion, hasFocusStateSpecified, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isProjected, isStateful, isVisible, jumpToCurrentState, mutate, onLayoutDirectionChanged, resolveOpacity, scheduleSelf, setAlpha, setAutoMirrored, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setTintBlendMode, setTintList, setTintMode, setVisible, unscheduleSelf -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
RoundedDrawable
RoundedDrawable(Bitmap bitmap)
-
-
Method Detail
-
fromBitmap
static RoundedDrawable fromBitmap(Bitmap bitmap)
-
fromDrawable
static Drawable fromDrawable(Drawable drawable)
-
drawableToBitmap
static Bitmap drawableToBitmap(Drawable drawable)
-
getSourceBitmap
Bitmap getSourceBitmap()
-
isStateful
boolean isStateful()
-
getOpacity
int getOpacity()
-
getAlpha
int getAlpha()
-
setAlpha
void setAlpha(int alpha)
-
getColorFilter
ColorFilter getColorFilter()
-
setColorFilter
void setColorFilter(ColorFilter cf)
-
setDither
void setDither(boolean dither)
-
setFilterBitmap
void setFilterBitmap(boolean filter)
-
getIntrinsicWidth
int getIntrinsicWidth()
-
getIntrinsicHeight
int getIntrinsicHeight()
-
getCornerRadius
float getCornerRadius()
-
getCornerRadius
float getCornerRadius(int corner)
- Parameters:
corner- the specific corner to get radius of.
-
setCornerRadius
RoundedDrawable setCornerRadius(float radius)
Sets all corners to the specified radius.
- Parameters:
radius- the radius.
-
setCornerRadius
RoundedDrawable setCornerRadius(int corner, float radius)
Sets the corner radius of one specific corner.
- Parameters:
corner- the corner.radius- the radius.
-
setCornerRadius
RoundedDrawable setCornerRadius(float topLeft, float topRight, float bottomRight, float bottomLeft)
Sets the corner radii of all the corners.
- Parameters:
topLeft- top left corner radius.topRight- top right corner radiusbottomRight- bototm right corner radius.bottomLeft- bottom left corner radius.
-
getBorderWidth
float getBorderWidth()
-
setBorderWidth
RoundedDrawable setBorderWidth(float width)
-
getBorderColor
int getBorderColor()
-
setBorderColor
RoundedDrawable setBorderColor(int color)
-
getBorderColors
ColorStateList getBorderColors()
-
setBorderColor
RoundedDrawable setBorderColor(ColorStateList colors)
-
isOval
boolean isOval()
-
setOval
RoundedDrawable setOval(boolean oval)
-
getScaleType
ImageView.ScaleType getScaleType()
-
setScaleType
RoundedDrawable setScaleType(ImageView.ScaleType scaleType)
-
getTileModeX
Shader.TileMode getTileModeX()
-
setTileModeX
RoundedDrawable setTileModeX(Shader.TileMode tileModeX)
-
getTileModeY
Shader.TileMode getTileModeY()
-
setTileModeY
RoundedDrawable setTileModeY(Shader.TileMode tileModeY)
-
-
-
-