嗯,我能够在webview中显示图像,现在我想在图像下面显示它的“标题”。如何在webview中显示图像标题/ alt?
string img = "<img typeof="foaf:Image" src="link/Photo_One.JPG" width="500" height="375" alt="" title="image cation need to display below" />";
String htmlData = "<html>"
+ head
+ "<body>"
+ "<h1 style=font-family:tt0248m_>"+ title + "</h1>"
+ "<P>"+ intro + "</P>"
+ data
+ "<br>"+ img
// LATER + intVenueString
+ "</body></html>";
web.loadDataWithBaseURL(null, htmlData, "text/html", "UTF-8", null);
任何人都可以知道如何做到这一点在web视图?
你可以在脚本中用'/'分割图片url字符串,并选择显示标题的最后一部分 –
你可以认为用snipet代码解释吗? – Uday