目前我即将显示 HTML
数据转化为我的应用程序是片段。我很困惑的,我需要使用获得的TextView
或的WebView
之间更好的性能其中之一。我的意思是,渲染速度和内存的问题。
Currently I'm about to display HTML
data into my application with fragment. I'm confused of which one I need to use to get better performance between TextView
or WebView
. I mean, for rendering speed and memory issue.
要知道, Html.fromHtml()
可用于的TextView
显示 HTML
格式的数据,但我想尝试的WebView
而不是的TextView 。但不知道渲染速度和内存的问题。
Know that Html.fromHtml()
is available for TextView
to display HTML
formatted data but I want to try WebView
instead of TextView
. But don't know rendering speed and memory issue.
的WebView
内部提供了显示的 HTML 数据不同的功能。您也可以在的WebView
。
WebView
internally provides different functionality for the display Html data. Also you can use JavaScript
in WebView
.
在的TextView
当你使用 Html.fromHtml()
那么它的仅支持少量的HTML标签。因此,我认为它能够更好地使用的WebView
While TextView
when you are use Html.fromHtml()
then its support only few Html tags.
So I think its better to use WebView.
我刚刚提到的WebView JavaScript功能,但还有像其他的功能(缩放功能,从网页图片等)都支持。
I just mentioned JavaScript functionality but There are other functionality like (Zoom Functionality, Image from web, etc..) All supports in WebView.