android - Why WebView doesn't render raw HTML properly? -


Maybe my question is stupid question but webview does not explain HTML tags I searched but there was no such problem . Please tell me if you have any ideas.

This is my code:

  @ Override public view creatives (LayoutsInflator, View Group Container, Bundle Saved InstantState) {// Get Reference to Application mContext = getActivity () GetApplicationContext (); Assign layout to // piece View view = inflater.inflate (R.layout.dialog_product_info, container, incorrect); MWebView = (webview) view.findViewById (R.id.webView); MWebView.setBackgroundColor (.getResources () getColor (R.color.transparent)); Return view; } @ Override Public Empty on Activity Crated (Bundle Saved Instantstate) {Super. On-activity creativity (saved instenstate); . GetDialog () setTitle (mProduct.getName ()); MWebView.loadDataWithBaseURL (blank, "& lt; HTML>" + mProduct.getDescription () + "& lt; / HTML & gt;", "text / html", "utf-8", tap); }   

Screenshots:

Enter image details here

Probably, getDescription () Check the value that comes back from getDescription () . If there are so many & amp; Lt; and & amp; Gt; , then these and & gt; converted into entity reference. You can send it back to & lt; and & gt; .

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -