How to display HTML images along with the text in android.? -
i new android development. using webview display html pages in android, text shows up. can please me problem. thank in advance, helpful.
webview view = (webview) this.findviewbyid(r.id.webview); try{ inputstream stream = this.getassets().open("capacitor code calculator.html"); int streamsize = stream.available(); byte[] buffer = new byte[streamsize]; stream.read(buffer); stream.close(); string html = new string(buffer); view.loaddata(html,"text/html", "utf-8"); } catch (exception e){ e.printstacktrace();
does have "text/html" in view.loaddata(html,"text/html", "utf-8");
i have html , image file both in assets folder.
it might can't have spaces in file name in line:
inputstream stream = this.getassets().open("capacitor code calculator.html");
what url you're giving in <img>
tag? have spaces in name also?
Comments
Post a Comment