Drawable

android.graphics.drawable.Drawableクラスは、描画を行うクラスのスーパークラスとなります。

クラス階層

  • java.lang.Object
    • android.graphics.drawable.Drawable
      • BitmapDrawable
      • ClipDrawable
      • ColorDrawable
      • DrawableContainer
        • AnimationDrawable
        • LevelListDrawable
        • StateListDrawable
      • GradientDrawable
      • InsetDrawable
      • LayerDrawable
        • TransitionDrawable
      • NinePatchDrawable
      • PictureDrawable
      • RotateDrawable
      • ScaleDrawable
      • ShapeDrawable
        • PaintDrawable

Drawableの生成

File

public static Drawable createFromPath (String pathName)
createFromPath - Drawable | Android Developers

Stream

public static Drawable createFromStream (
    InputStream is,
    String srcName
    )
public static Drawable createFromResourceStream (
    Resources res,
    TypedValue value,
    InputStream is,
    String srcName
    )
public static Drawable createFromResourceStream (
    Resources res,
    TypedValue value,
    InputStream is,
    String srcName,
    BitmapFactory.Options opts
    )

Xml

public static Drawable createFromXml (
    Resources r,
    XmlPullParser parser
    )
public static Drawable createFromXmlInner (
    Resources r,
    XmlPullParser parser,
    AttributeSet attrs
    )
Androidの情報サイトから、まとめて検索