public class RoundedDrawable
extends android.graphics.drawable.Drawable
限定符和类型 | 字段和说明 |
---|---|
static int |
DEFAULT_BORDER_COLOR |
static java.lang.String |
TAG |
构造器和说明 |
---|
RoundedDrawable(android.graphics.Bitmap bitmap) |
限定符和类型 | 方法和说明 |
---|---|
void |
draw(android.graphics.Canvas canvas) |
static android.graphics.Bitmap |
drawableToBitmap(android.graphics.drawable.Drawable drawable) |
static RoundedDrawable |
fromBitmap(android.graphics.Bitmap bitmap) |
static android.graphics.drawable.Drawable |
fromDrawable(android.graphics.drawable.Drawable drawable) |
int |
getBorderColor() |
android.content.res.ColorStateList |
getBorderColors() |
float |
getBorderWidth() |
float |
getCornerRadius() |
int |
getIntrinsicHeight() |
int |
getIntrinsicWidth() |
int |
getOpacity() |
android.widget.ImageView.ScaleType |
getScaleType() |
boolean |
isOval() |
boolean |
isStateful() |
protected void |
onBoundsChange(android.graphics.Rect bounds) |
protected boolean |
onStateChange(int[] state) |
void |
setAlpha(int alpha) |
RoundedDrawable |
setBorderColor(android.content.res.ColorStateList colors) |
RoundedDrawable |
setBorderColor(int color) |
RoundedDrawable |
setBorderWidth(float width) |
void |
setColorFilter(android.graphics.ColorFilter cf) |
RoundedDrawable |
setCornerRadius(float radius) |
void |
setDither(boolean dither) |
void |
setFilterBitmap(boolean filter) |
RoundedDrawable |
setOval(boolean oval) |
RoundedDrawable |
setScaleType(android.widget.ImageView.ScaleType scaleType) |
android.graphics.Bitmap |
toBitmap() |
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getAlpha, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getLevel, getMinimumHeight, getMinimumWidth, getOutline, getPadding, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isVisible, jumpToCurrentState, mutate, onLevelChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setHotspot, setHotspotBounds, setLevel, setState, setTint, setTintList, setTintMode, setVisible, unscheduleSelf
public static final java.lang.String TAG
public static final int DEFAULT_BORDER_COLOR
public static RoundedDrawable fromBitmap(android.graphics.Bitmap bitmap)
public static android.graphics.drawable.Drawable fromDrawable(android.graphics.drawable.Drawable drawable)
public static android.graphics.Bitmap drawableToBitmap(android.graphics.drawable.Drawable drawable)
public boolean isStateful()
isStateful
在类中 android.graphics.drawable.Drawable
protected boolean onStateChange(int[] state)
onStateChange
在类中 android.graphics.drawable.Drawable
protected void onBoundsChange(android.graphics.Rect bounds)
onBoundsChange
在类中 android.graphics.drawable.Drawable
public void draw(android.graphics.Canvas canvas)
draw
在类中 android.graphics.drawable.Drawable
public int getOpacity()
getOpacity
在类中 android.graphics.drawable.Drawable
public void setAlpha(int alpha)
setAlpha
在类中 android.graphics.drawable.Drawable
public void setColorFilter(android.graphics.ColorFilter cf)
setColorFilter
在类中 android.graphics.drawable.Drawable
public void setDither(boolean dither)
setDither
在类中 android.graphics.drawable.Drawable
public void setFilterBitmap(boolean filter)
setFilterBitmap
在类中 android.graphics.drawable.Drawable
public int getIntrinsicWidth()
getIntrinsicWidth
在类中 android.graphics.drawable.Drawable
public int getIntrinsicHeight()
getIntrinsicHeight
在类中 android.graphics.drawable.Drawable
public float getCornerRadius()
public RoundedDrawable setCornerRadius(float radius)
public float getBorderWidth()
public RoundedDrawable setBorderWidth(float width)
public int getBorderColor()
public RoundedDrawable setBorderColor(int color)
public android.content.res.ColorStateList getBorderColors()
public RoundedDrawable setBorderColor(android.content.res.ColorStateList colors)
public boolean isOval()
public RoundedDrawable setOval(boolean oval)
public android.widget.ImageView.ScaleType getScaleType()
public RoundedDrawable setScaleType(android.widget.ImageView.ScaleType scaleType)
public android.graphics.Bitmap toBitmap()