Class of android.graphics.drawable · Drawable.java · Android's reference
public abstract class Drawable
Something that draws itself into bounds: the base of the framework's drawables.
Page 1 2
public static Drawable load(Resources res, int id, Resources.Theme theme) sourceThe drawable of a resource, as Android's ResourcesImpl.loadDrawable makes it: a color is a ColorDrawable, an XML file is inflated by the class of its root tag, and an image file is decoded at the resource's density (a BitmapDrawable, or a NinePatchDrawable when the PNG has a nine-patch chunk).
public static Drawable createFromXml(Resources r, XmlPullParser parser) throws XmlPullParserException, IOException sourceThe drawable of an XML document: its first element, inflated by createFromXmlInner.
public static Drawable createFromXml(Resources r, XmlPullParser parser, Resources.Theme theme) throws XmlPullParserException, IOException sourcepublic static Drawable createFromResourceStream(Resources res, TypedValue value, InputStream is, String srcName) sourceA drawable of an encoded image: a BitmapDrawable, or a NinePatchDrawable when the image has a nine-patch chunk.
public static Drawable createFromResourceStream(Resources res, TypedValue value, InputStream is, String srcName, android.graphics.BitmapFactory.Options opts) sourcepublic static Drawable createFromStream(InputStream is, String srcName) sourcepublic static Drawable createFromPath(String pathName) sourcepublic static Drawable createFromXmlInner(Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException sourceThe drawable of an XML element that the parser is on: an empty drawable of the tag's class, then inflated.
public static Drawable createFromXmlInner(Resources r, XmlPullParser parser, AttributeSet attrs) throws XmlPullParserException, IOException sourcepublic void inflate(Resources r, XmlPullParser parser, AttributeSet attrs) throws XmlPullParserException, IOException sourcepublic void inflate(Resources r, XmlPullParser parser, AttributeSet attrs, Resources.Theme theme) throws XmlPullParserException, IOException sourceThe base drawable reads only android:visible.
public abstract void draw(Canvas canvas) sourcepublic void setBounds(int left, int top, int right, int bottom) sourcepublic void setBounds(Rect b) sourcepublic final void copyBounds(Rect bounds) sourcepublic final Rect copyBounds() sourcepublic final Rect getBounds() sourcepublic Rect getDirtyBounds() sourcepublic void setChangingConfigurations(int configs) sourcepublic int getChangingConfigurations() sourcepublic void setDither(boolean dither) empty body deprecated sourcepublic void setFilterBitmap(boolean filter) empty body sourcepublic boolean isFilterBitmap() sourcepublic final void setCallback(Callback cb) sourcepublic Callback getCallback() sourcepublic void invalidateSelf() sourcepublic void scheduleSelf(Runnable what, long when) sourcepublic void unscheduleSelf(Runnable what) sourcepublic int getLayoutDirection() sourcepublic final boolean setLayoutDirection(int dir) sourcePage 1 2
Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.