Android examples for Graphics:Drawable Operation
get System Attribute Drawable
//package com.java2s; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; public class Main { public static Drawable getSystemAttrDrawable(Context context, int attr) { TypedArray a = context.obtainStyledAttributes(new int[] { attr }); Drawable d = a.getDrawable(a.getIndex(0)); a.recycle();// www . j a v a 2s .com return d; } }