Answer the question
In order to leave comments, you need to log in
How to insert an image into html text?
There is text in html, in the assets folder. Insert an image (png) into this text. Here's how I do it:
....На спомин Господа Бога і Спаса нашого Ісуса Христа <font COLOR='RED'>(тричі).</font><br />
<p style="text-align: center;">
<img src='" + getResources().getDrawable(R.drawable.proskomydiya_1)"'/>
</p><br />
І надрізує копієм з правого боку печатки (з лівої руки священика)...
Html.ImageGetter imageGetter = new Html.ImageGetter() {
@Override
public Drawable getDrawable(String source) {
Drawable d;
if(string_title.contains("lit_1_part_2" ) || string_title.contains("lit_2_part_2")){
d = getResources().getDrawable(R.drawable.proskomydiya_1);
} else {
d = getResources().getDrawable(R.drawable.proskomydiya_2);
}
d.setBounds(0, 0, d.getIntrinsicWidth()/2, d.getIntrinsicHeight()/2);
return d;
int width = getWindowManager().getDefaultDisplay().getWidth();
int height = getWindowManager().getDefaultDisplay().getWidth();
d.setBounds(0, 0, width, height);
return d;
<img src='" + getResources().getDrawable(R.drawable.proskomydiya_1)"' width="200" height="200"/>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question