or
TextView tv; Drawable icon; Bitmap b = Bitmap.createScaledBitmap(((BitmapDrawable) icon).getBitmap(), 120, 120, false); icon = new BitmapDrawable(b); icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight()); tv.setTextSize(12); tv.setGravity(Gravity.CENTER); tv.setCompoundDrawables(icon, null, null, null);
No comments:
Post a Comment