This is my sample html code that suppose to convert to html, I've tested this code on several application and it works fine. This is the code :
WebSettings settings = des.getSettings();
settings.setDefaultTextEncodingName("utf-8");
settings.setCacheMode(WebSettings.LOAD_NO_CACHE);
settings.setSaveFormData(false);
settings.setSupportZoom(false);
int fontsize=15;
if(fontsize>20)fontsize=13;
settings.setDefaultFontSize(fontsize);
settings.setBuiltInZoomControls(false);
des.loadData(
"<html><head><style>@font-face { font-family: myface;src: url(\"file:///android_asset/yekan.ttf\");" +
"BODY, HTML {background: transparent; } body,div { font-family: myface;} </style></head><body><div style='text-align: justify; line-height: 23px;float:right' dir='rtl'>"
+ dataC.get(0).get("tozih").replace(""","'") + "</div></body></html>",
"text/html; charset=utf-8", "UTF-8");
the html is something like this :
<p>ok</p>
When I run the application, the WebView show me exactly the above line, it doesn't shows it as html.
Why is that? what should I do to solve this?
Thanks