When I am add icon like below:
etComment = (EditText) findViewById(R.id.et_comment);
Drawable img = getResources().getDrawable( R.drawable.warning );
etComme
I think you can use different size of pics for different screens and use getMinimumWidth to set Bounds.But I did not try it before , may be it is not appropriate for .9 patch.
When you use setCompoundDrawables , you need code like :
Drawable img;
Resources res = getResources();
img = res.getDrawable(R.drawable.btn_img);
//You need to setBounds before setCompoundDrawables , or it couldn't display
img.setBounds(0, 0, img.getMinimumWidth(), img.getMinimumHeight());
btn.setCompoundDrawables(img_off, null, null, null);