ShadowDrawableWrapper
public
class
ShadowDrawableWrapper
extends DrawableWrapperCompat
java.lang.Object
|
↳ |
android.graphics.drawable.Drawable
|
|
↳ |
androidx.appcompat.graphics.drawable.DrawableWrapperCompat
|
|
|
↳ |
com.google.android.material.shadow.ShadowDrawableWrapper
|
This class is deprecated.
Use MaterialShapeDrawable
instead.
A Drawable
which wraps another drawable and draws a shadow
around it.
Summary
Public constructors |
ShadowDrawableWrapper(Context context, Drawable content, float radius, float shadowSize, float maxShadowSize)
|
Inherited methods |
From class
androidx.appcompat.graphics.drawable.DrawableWrapperCompat
void
|
draw(Canvas arg0)
|
int
|
getChangingConfigurations()
|
Drawable
|
getCurrent()
|
Drawable
|
getDrawable()
|
int
|
getIntrinsicHeight()
|
int
|
getIntrinsicWidth()
|
int
|
getMinimumHeight()
|
int
|
getMinimumWidth()
|
int
|
getOpacity()
|
boolean
|
getPadding(Rect arg0)
|
int[]
|
getState()
|
Region
|
getTransparentRegion()
|
void
|
invalidateDrawable(Drawable arg0)
|
boolean
|
isAutoMirrored()
|
boolean
|
isStateful()
|
void
|
jumpToCurrentState()
|
void
|
onBoundsChange(Rect arg0)
|
boolean
|
onLevelChange(int arg0)
|
void
|
scheduleDrawable(Drawable arg0, Runnable arg1, long arg2)
|
void
|
setAlpha(int arg0)
|
void
|
setAutoMirrored(boolean arg0)
|
void
|
setChangingConfigurations(int arg0)
|
void
|
setColorFilter(ColorFilter arg0)
|
void
|
setDither(boolean arg0)
|
void
|
setDrawable(Drawable arg0)
|
void
|
setFilterBitmap(boolean arg0)
|
void
|
setHotspot(float arg0, float arg1)
|
void
|
setHotspotBounds(int arg0, int arg1, int arg2, int arg3)
|
boolean
|
setState(int[] arg0)
|
void
|
setTint(int arg0)
|
void
|
setTintList(ColorStateList arg0)
|
void
|
setTintMode(PorterDuff.Mode arg0)
|
boolean
|
setVisible(boolean arg0, boolean arg1)
|
void
|
unscheduleDrawable(Drawable arg0, Runnable arg1)
|
|
From class
android.graphics.drawable.Drawable
void
|
applyTheme(Resources.Theme arg0)
|
boolean
|
canApplyTheme()
|
void
|
clearColorFilter()
|
final
Rect
|
copyBounds()
|
final
void
|
copyBounds(Rect arg0)
|
static
Drawable
|
createFromPath(String arg0)
|
static
Drawable
|
createFromResourceStream(Resources arg0, TypedValue arg1, InputStream arg2, String arg3, BitmapFactory.Options arg4)
|
static
Drawable
|
createFromResourceStream(Resources arg0, TypedValue arg1, InputStream arg2, String arg3)
|
static
Drawable
|
createFromStream(InputStream arg0, String arg1)
|
static
Drawable
|
createFromXml(Resources arg0, XmlPullParser arg1)
|
static
Drawable
|
createFromXml(Resources arg0, XmlPullParser arg1, Resources.Theme arg2)
|
static
Drawable
|
createFromXmlInner(Resources arg0, XmlPullParser arg1, AttributeSet arg2, Resources.Theme arg3)
|
static
Drawable
|
createFromXmlInner(Resources arg0, XmlPullParser arg1, AttributeSet arg2)
|
abstract
void
|
draw(Canvas arg0)
|
int
|
getAlpha()
|
final
Rect
|
getBounds()
|
Drawable.Callback
|
getCallback()
|
int
|
getChangingConfigurations()
|
ColorFilter
|
getColorFilter()
|
Drawable.ConstantState
|
getConstantState()
|
Drawable
|
getCurrent()
|
Rect
|
getDirtyBounds()
|
void
|
getHotspotBounds(Rect arg0)
|
int
|
getIntrinsicHeight()
|
int
|
getIntrinsicWidth()
|
int
|
getLayoutDirection()
|
final
int
|
getLevel()
|
int
|
getMinimumHeight()
|
int
|
getMinimumWidth()
|
abstract
int
|
getOpacity()
|
Insets
|
getOpticalInsets()
|
void
|
getOutline(Outline arg0)
|
boolean
|
getPadding(Rect arg0)
|
int[]
|
getState()
|
Region
|
getTransparentRegion()
|
boolean
|
hasFocusStateSpecified()
|
void
|
inflate(Resources arg0, XmlPullParser arg1, AttributeSet arg2, Resources.Theme arg3)
|
void
|
inflate(Resources arg0, XmlPullParser arg1, AttributeSet arg2)
|
void
|
invalidateSelf()
|
boolean
|
isAutoMirrored()
|
boolean
|
isFilterBitmap()
|
boolean
|
isProjected()
|
boolean
|
isStateful()
|
final
boolean
|
isVisible()
|
void
|
jumpToCurrentState()
|
Drawable
|
mutate()
|
void
|
onBoundsChange(Rect arg0)
|
boolean
|
onLayoutDirectionChanged(int arg0)
|
boolean
|
onLevelChange(int arg0)
|
boolean
|
onStateChange(int[] arg0)
|
static
int
|
resolveOpacity(int arg0, int arg1)
|
void
|
scheduleSelf(Runnable arg0, long arg1)
|
abstract
void
|
setAlpha(int arg0)
|
void
|
setAutoMirrored(boolean arg0)
|
void
|
setBounds(int arg0, int arg1, int arg2, int arg3)
|
void
|
setBounds(Rect arg0)
|
final
void
|
setCallback(Drawable.Callback arg0)
|
void
|
setChangingConfigurations(int arg0)
|
void
|
setColorFilter(int arg0, PorterDuff.Mode arg1)
|
abstract
void
|
setColorFilter(ColorFilter arg0)
|
void
|
setDither(boolean arg0)
|
void
|
setFilterBitmap(boolean arg0)
|
void
|
setHotspot(float arg0, float arg1)
|
void
|
setHotspotBounds(int arg0, int arg1, int arg2, int arg3)
|
final
boolean
|
setLayoutDirection(int arg0)
|
final
boolean
|
setLevel(int arg0)
|
boolean
|
setState(int[] arg0)
|
void
|
setTint(int arg0)
|
void
|
setTintBlendMode(BlendMode arg0)
|
void
|
setTintList(ColorStateList arg0)
|
void
|
setTintMode(PorterDuff.Mode arg0)
|
boolean
|
setVisible(boolean arg0, boolean arg1)
|
void
|
unscheduleSelf(Runnable arg0)
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
From interface
android.graphics.drawable.Drawable.Callback
abstract
void
|
invalidateDrawable(Drawable arg0)
|
abstract
void
|
scheduleDrawable(Drawable arg0, Runnable arg1, long arg2)
|
abstract
void
|
unscheduleDrawable(Drawable arg0, Runnable arg1)
|
|
Public constructors
ShadowDrawableWrapper
public ShadowDrawableWrapper (Context context,
Drawable content,
float radius,
float shadowSize,
float maxShadowSize)
Parameters |
context |
Context |
content |
Drawable |
radius |
float |
shadowSize |
float |
maxShadowSize |
float |
Public methods
calculateHorizontalPadding
public static float calculateHorizontalPadding (float maxShadowSize,
float cornerRadius,
boolean addPaddingForCorners)
Parameters |
maxShadowSize |
float |
cornerRadius |
float |
addPaddingForCorners |
boolean |
calculateVerticalPadding
public static float calculateVerticalPadding (float maxShadowSize,
float cornerRadius,
boolean addPaddingForCorners)
Parameters |
maxShadowSize |
float |
cornerRadius |
float |
addPaddingForCorners |
boolean |
draw
public void draw (Canvas canvas)
getCornerRadius
public float getCornerRadius ()
getMaxShadowSize
public float getMaxShadowSize ()
getMinHeight
public float getMinHeight ()
getMinWidth
public float getMinWidth ()
getOpacity
public int getOpacity ()
getPadding
public boolean getPadding (Rect padding)
getShadowSize
public float getShadowSize ()
setAddPaddingForCorners
public void setAddPaddingForCorners (boolean addPaddingForCorners)
Parameters |
addPaddingForCorners |
boolean |
setAlpha
public void setAlpha (int alpha)
setCornerRadius
public void setCornerRadius (float radius)
setMaxShadowSize
public void setMaxShadowSize (float size)
setRotation
public final void setRotation (float rotation)
Parameters |
rotation |
float |
setShadowSize
public void setShadowSize (float size)
setShadowSize
public void setShadowSize (float shadowSize,
float maxShadowSize)
Parameters |
shadowSize |
float |
maxShadowSize |
float |
Protected methods
onBoundsChange
protected void onBoundsChange (Rect bounds)