android.graphics.drawable
Class ShapeDrawable
java.lang.Object
android.graphics.drawable.Drawable
android.graphics.drawable.ShapeDrawable
- Direct Known Subclasses:
- PaintDrawable
public class ShapeDrawable
- extends Drawable
Method Summary |
void |
draw(Canvas canvas)
|
int |
getChangingConfigurations()
|
Drawable.ConstantState |
getConstantState()
|
int |
getIntrinsicHeight()
|
int |
getIntrinsicWidth()
|
int |
getOpacity()
|
boolean |
getPadding(Rect padding)
|
Paint |
getPaint()
|
ShapeDrawable.ShaderFactory |
getShaderFactory()
|
Shape |
getShape()
|
void |
inflate(Resources r,
org.xmlpull.v1.XmlPullParser parser,
AttributeSet attrs)
|
protected boolean |
inflateTag(String name,
Resources r,
org.xmlpull.v1.XmlPullParser parser,
AttributeSet attrs)
|
Drawable |
mutate()
|
protected void |
onBoundsChange(Rect bounds)
|
protected void |
onDraw(Shape shape,
Canvas canvas,
Paint paint)
|
void |
setAlpha(int alpha)
|
void |
setColorFilter(ColorFilter cf)
|
void |
setDither(boolean dither)
|
void |
setIntrinsicHeight(int height)
|
void |
setIntrinsicWidth(int width)
|
void |
setPadding(int left,
int top,
int right,
int bottom)
|
void |
setPadding(Rect padding)
|
void |
setShaderFactory(ShapeDrawable.ShaderFactory fact)
|
void |
setShape(Shape s)
|
Methods inherited from class android.graphics.drawable.Drawable |
clearColorFilter, copyBounds, copyBounds, createFromPath, createFromResourceStream, createFromResourceStream, createFromStream, createFromXml, createFromXmlInner, getBounds, getCallback, getCurrent, getLevel, getMinimumHeight, getMinimumWidth, getState, getTransparentRegion, invalidateSelf, isStateful, isVisible, jumpToCurrentState, onLevelChange, onStateChange, resolveOpacity, scheduleSelf, setBounds, setBounds, setCallback, setChangingConfigurations, setColorFilter, setFilterBitmap, setLevel, setState, setVisible, unscheduleSelf |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShapeDrawable
public ShapeDrawable()
ShapeDrawable
public ShapeDrawable(Shape s)
getShape
public Shape getShape()
setShape
public void setShape(Shape s)
setShaderFactory
public void setShaderFactory(ShapeDrawable.ShaderFactory fact)
getShaderFactory
public ShapeDrawable.ShaderFactory getShaderFactory()
getPaint
public Paint getPaint()
setPadding
public void setPadding(int left,
int top,
int right,
int bottom)
setPadding
public void setPadding(Rect padding)
setIntrinsicWidth
public void setIntrinsicWidth(int width)
setIntrinsicHeight
public void setIntrinsicHeight(int height)
getIntrinsicWidth
public int getIntrinsicWidth()
- Overrides:
getIntrinsicWidth
in class Drawable
getIntrinsicHeight
public int getIntrinsicHeight()
- Overrides:
getIntrinsicHeight
in class Drawable
getPadding
public boolean getPadding(Rect padding)
- Overrides:
getPadding
in class Drawable
onDraw
protected void onDraw(Shape shape,
Canvas canvas,
Paint paint)
draw
public void draw(Canvas canvas)
- Specified by:
draw
in class Drawable
getChangingConfigurations
public int getChangingConfigurations()
- Overrides:
getChangingConfigurations
in class Drawable
setAlpha
public void setAlpha(int alpha)
- Specified by:
setAlpha
in class Drawable
setColorFilter
public void setColorFilter(ColorFilter cf)
- Specified by:
setColorFilter
in class Drawable
getOpacity
public int getOpacity()
- Specified by:
getOpacity
in class Drawable
setDither
public void setDither(boolean dither)
- Overrides:
setDither
in class Drawable
onBoundsChange
protected void onBoundsChange(Rect bounds)
- Overrides:
onBoundsChange
in class Drawable
inflateTag
protected boolean inflateTag(String name,
Resources r,
org.xmlpull.v1.XmlPullParser parser,
AttributeSet attrs)
inflate
public void inflate(Resources r,
org.xmlpull.v1.XmlPullParser parser,
AttributeSet attrs)
throws org.xmlpull.v1.XmlPullParserException,
IOException
- Overrides:
inflate
in class Drawable
- Throws:
org.xmlpull.v1.XmlPullParserException
IOException
getConstantState
public Drawable.ConstantState getConstantState()
- Overrides:
getConstantState
in class Drawable
mutate
public Drawable mutate()
- Overrides:
mutate
in class Drawable
Copyright © 2008-2012. All Rights Reserved.