I am using textview to load the HTML text. The HTML text has images. I am using ImageGetter
to load images. But the image is getting cropped in the right. Below is the code:
textView.setText(Html.fromHtml(htmlText, new ImageGetter() {
@Override
public Drawable getDrawable(String source) {
String path = "/sdcard/" + source;
Drawable bmp = Drawable.createFromPath(path);
bmp.setBounds(0, 0, bmp.getIntrinsicWidth(), bmp.getIntrinsicHeight());
return bmp; }}, null));