public class ShadowDrawable
extends android.graphics.drawable.Drawable
View
This works similar to NavButtonDrawable
but does not auto-pad the
original drawable. It simply creates a shadow that is rendered under a given
view. Padding may be necessary to prevent the shadow from being cut off.Constructor and Description |
---|
ShadowDrawable(android.content.Context appContext,
android.view.View view) |
Modifier and Type | Method and Description |
---|---|
void |
draw(android.graphics.Canvas canvas) |
int |
getOpacity() |
static boolean |
isSupported()
Check if RenderScript is supported on this device
|
void |
setAlpha(int alpha) |
void |
setColor(int color)
Set the color of the shadow
|
void |
setColorFilter(android.graphics.ColorFilter colorFilter) |
applyTheme, canApplyTheme, clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXml, createFromXmlInner, createFromXmlInner, getAlpha, getBounds, getCallback, getChangingConfigurations, getColorFilter, getConstantState, getCurrent, getDirtyBounds, getHotspotBounds, getIntrinsicHeight, getIntrinsicWidth, getLayoutDirection, getLevel, getMinimumHeight, getMinimumWidth, getOpticalInsets, getOutline, getPadding, getState, getTransparentRegion, inflate, inflate, invalidateSelf, isAutoMirrored, isFilterBitmap, isProjected, isStateful, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLayoutDirectionChanged, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setAutoMirrored, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setHotspot, setHotspotBounds, setLayoutDirection, setLevel, setState, setTint, setTintBlendMode, setTintList, setTintMode, setVisible, unscheduleSelf
public ShadowDrawable(android.content.Context appContext, android.view.View view)
public static boolean isSupported()
public void setColor(int color)
color
- Shadow colorpublic void draw(android.graphics.Canvas canvas)
draw
in class android.graphics.drawable.Drawable
public void setAlpha(int alpha)
setAlpha
in class android.graphics.drawable.Drawable
public void setColorFilter(android.graphics.ColorFilter colorFilter)
setColorFilter
in class android.graphics.drawable.Drawable
public int getOpacity()
getOpacity
in class android.graphics.drawable.Drawable