Android TextViews 和 WebViews 设置 html 文本不一致

发布于 2024-12-05 09:14:57 字数 628 浏览 5 评论 0原文

我正在使用 Html.fromHtml 将 Text 设置为我的 textView。这是我的文字。

下图未按比例绘制。以下哪项最有可能是 ∠P 的值?

在这句话中,角符号是 html 值( 在此处输入图像描述 )。

它在模拟器中运行良好。我还在一些 Android 设备(一些未命名的平板电脑和电子书阅读器)上进行了测试。他们都还好。但在我的 Android 手机(索尼 Xperia X8)中,它没有渲染角度符号。相反,它显示 在此处输入图像描述

有什么问题吗?尽管它只是一个渲染简单 html 的 textview ,但为什么它在不同设备上不一致?更重要的是,我该如何解决这个问题。以下是我的问题的图形表示。

在此处输入图像描述


编辑:它不仅在文本视图中,而且在网络视图中。我更改为使用 webview 而不是 textview。不幸的是,它并没有成功。有人知道吗?

I am using Html.fromHtml to setText to my textView. Here is my text.

The figure below is not drawn to scale. Which of the following will most likely to be the value of ∠P?

In this sentence, angle sign is html value ( enter image description here ).

It is working fine in emulator. I also tested on some android device (some unnamed tablets an ebook readers). They are ok. But in my android phone (Sony Xperia X8), it is not rendering angle sign. Instead, it is showing enter image description here .

Is there anything wrong? Why is it not being consistent across devices although it is just a textview rendering simple html? More importantly, how could I solve this issue. Following is my graphical representation of my problem.

enter image description here


Edit: It is not only in textviews but also in webviews. I changed using webview instead of textview. Unfortunately, it didn't work out as well. Anyone got any idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文