-1
JSON에서 HTML 코드를 가져 와서 string에 저장하고 webView에로드하면 문제가 생길 수 있습니다. 문자열이 너무 많이 변경 될 때 & & quot는 왜 표시됩니까? 그것의로드하지 않는 이미지 내 화면이 모양 다음 http://imgur.com/KHRJjqN 내가 뭘 /? 그것을 해독하는 방법 ?? 왜 그것을 인코딩합니까? 인코딩을 제거하는 방법?json에 들어가서 문자열에 저장하면 html 코드가 변경됩니다.
WebView wv = (WebView) findViewById(R.id.webview1);
{"Status":1,
"data":
[
{"product_id":"8569",
"name":"Scalp Med Hair Grow PC-0004..",
"description":"<p><b><font face="Arial">Scalp Med Hair Grow PC-0004.. <\/font><\/b><\/p>
\r\n\r \n<p><img border="0" height="257" src="http:\/\/www.megamall.com.pk\/image\/cache
\/data\/10011-Scalp-Med-Hairfall-Solution- 800x800.jpg" width="261" \/><\/p>\r\n\r
\n<p><b><font face="Arial" size="2">
Features: <\/font><\/b><\/p>\r\n\r\n<p><font face="Arial" size="2"><b>Scalp Med Hair
Grow<\/b> is an all natural formulation which includes the pure extracts of plants from
3 different continents.<br \/>\r\n<br \/>\r\nIs your Bald Spot getting bigger and bigger
every month?<br \/>\r\nIs the hair on your shower floor getting thicker while it gets
thinner and thinner on your head?<br \/>\r\n<br \/>\r\nThen Scalp Med Hair Grow
is for you. Scalp Med Hair Grow is an all natural formulation which includes the
pure extracts of plants from 3 different continents. This tried and tested formulation
will reach deep down to cleanse, revitalize and unblock the hair follicles allowing vital
nutrients to reach the hair roots and allow hair to grow again.<br \/>\r\n<br \/>\r\nScalp
Med Hair Grow is the only ecological product of its kind capable of treating alopecia
efficiently. In the first month, continual use of Scalp Med Hair Grow will recover
and strengthen the hair follicles. In the second month, your hair will stop
falling out altogether. And by the third month, new hair will start to grow.
<\/font><\/p>\r\n",
}
]}
when get in json and save in string
String htmldescription = school2.getJSONObject(0).getString("description");
wv.loadData(htmldescription, "text/html", "utf8");
// String htmldescription save data like this below
htmldescription ="
<p><b><font face="Arial">Scalp Med Hair Grow PC-0004..
</font></b></p> <p><img border="0" height=&
quot;257"
src="http://www.megamall.com.pk/image/cache/data/10011-Scalp-Med-Hairfall-Solution-
800x800.jpg" width="261" /></p>
<p><b><font face="Arial" size="2">Features:
</font></b></p><p><font face="Arial"
size="2"><b>Scalp Med Hair Grow</b>
is an all natural formulation which includes the pure extracts of plants from 3 different
continents.<br /><br />Is your Bald Spot getting bigger and bigger every
month?<br />Is the hair on your shower floor getting thicker while it gets thinner and
thinner on your head?<br /><br />
Then Scalp Med Hair Grow is for you. Scalp Med Hair Grow is an all natural
formulation which includes the pure extracts of plants from 3 different continents. This
tried and tested formulation will reach deep down to cleanse, revitalize and unblock the hair
follicles allowing vital nutrients to reach the hair roots and allow hair to grow again.<br
/><br />
Scalp Med Hair Grow is the only ecological product of its kind capable of
treating alopecia efficiently. In the first month, continual use of Scalp Med Hair Grow will
recover and strengthen the hair follicles. In the second month, your hair will
stop falling out altogether. And by the third month, new hair will start to
grow.</font></p>"
내 HTML 코드 변경 이유 아니 생각을 도움이되지 문서 http://developer.android.com/reference/android/text/Html.html를 보라 도움이 ????????? – user2931692