我可以将全宽度照片设置为textView
抱歉,我不能说英语我的代码:
public class ImageGetter implements Html.ImageGetter {
@Override
public Drawable getDrawable(String source) {
Drawable drawable = getResources().getDrawable(R.drawable.imgN);
if (source.equals("img1")) {
drawable = getResources().getDrawable(R.drawable.img1);
drawable.setBounds(0, 0, 100, 150);
return drawable;
}
}
宽度= 100% drawable.setBounds(0,0,width,height);