|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.graphics.drawable.Drawable
net.simonvt.menudrawer.ColorDrawable
public class ColorDrawable
A specialized Drawable that fills the Canvas with a specified color. Note that a ColorDrawable ignores the ColorFilter.
It can be defined in an XML file with the <color> element.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class android.graphics.drawable.Drawable |
|---|
android.graphics.drawable.Drawable.Callback, android.graphics.drawable.Drawable.ConstantState |
| Constructor Summary | |
|---|---|
ColorDrawable()
Creates a new black ColorDrawable. |
|
ColorDrawable(int color)
Creates a new ColorDrawable with the specified color. |
|
| Method Summary | |
|---|---|
void |
draw(android.graphics.Canvas canvas)
|
int |
getAlpha()
Returns the alpha value of this drawable's color. |
int |
getChangingConfigurations()
|
int |
getColor()
Gets the drawable's color value. |
android.graphics.drawable.Drawable.ConstantState |
getConstantState()
|
int |
getOpacity()
|
void |
setAlpha(int alpha)
Sets the color's alpha value. |
void |
setColor(int color)
Sets the drawable's color value. |
void |
setColorFilter(android.graphics.ColorFilter colorFilter)
Setting a color filter on a ColorDrawable has no effect. |
| Methods inherited from class android.graphics.drawable.Drawable |
|---|
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, getBounds, getCallback, getCurrent, getIntrinsicHeight, getIntrinsicWidth, getLevel, getMinimumHeight, getMinimumWidth, getPadding, getState, getTransparentRegion, inflate, invalidateSelf, isStateful, isVisible, jumpToCurrentState, mutate, onBoundsChange, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setDither, setFilterBitmap, setLevel, setState, setVisible, unscheduleSelf |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColorDrawable()
public ColorDrawable(int color)
color - The color to draw.| Method Detail |
|---|
public int getChangingConfigurations()
getChangingConfigurations in class android.graphics.drawable.Drawablepublic void draw(android.graphics.Canvas canvas)
draw in class android.graphics.drawable.Drawablepublic int getColor()
public void setColor(int color)
setAlpha(int) on this object, which side-affected the underlying color.
color - The color to draw.public int getAlpha()
public void setAlpha(int alpha)
setAlpha in class android.graphics.drawable.Drawablealpha - The alpha value to set, between 0 and 255.public void setColorFilter(android.graphics.ColorFilter colorFilter)
setColorFilter in class android.graphics.drawable.DrawablecolorFilter - Ignore.public int getOpacity()
getOpacity in class android.graphics.drawable.Drawablepublic android.graphics.drawable.Drawable.ConstantState getConstantState()
getConstantState in class android.graphics.drawable.Drawable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||