Textview tv=new TextView(context);
tv.setText("zhongge");
tv.setCompoundDrawablesIntrinsicBounds(drawable,null,null,null);
tv.setDrawingCacheEnabled(true);
Bitmap b=Bitmap.create(tv.getDrawingCache());
tv.destroyDrawingCache();
Textview tv=new TextView(context);
tv.setText("zhongge");
tv.setCompoundDrawablesIntrinsicBounds(drawable,null,null,null);
tv.setDrawingCacheEnabled(true);
Bitmap b=Bitmap.create(tv.getDrawingCache());
tv.destroyDrawingCache();