This is how we can resize a normal bitmap drawable
Drawable d = getResources().getDrawable(R.drawable.error);
Bitmap bm = ((BitmapDrawable)d).getBitmap();
error_indicator = new BitmapDrawable(getResources(), bm.createScaledBitmap(bm, 50, 50, true));
But I want to know how to resize a nine patch drawable. since the above code doesnt works for me giving me ClassCastException saying NinePatchDrawable cannot be cast to BitmapDrawable.
This is nine-patch drawable(hdpi).I have other resolutions icons too
Draw 9-patch tool screenshot
App Screenshot