UiUtils.resolveDrawable() - that will also properly recycle the TypedArray instance ;)