android - 在 strings.xml 中使用特殊字符在 WebView 中加载

标签 android android-layout android-webview android-view

我正在使用 WebView 来显示字符串资源。这是代码-

<string name="abc">à</string>
<string name="abcd">è</string>

当我在我的 webView 中加载它时,它会显示一些垃圾值。如何在 WebView 中显示这些特殊字符??

最佳答案

检查 this特殊字符列表以及如何在 html 中编码。

<string name="abc">&#224;</string>
<string name="abc">&#232;</string>

关于android - 在 strings.xml 中使用特殊字符在 WebView 中加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18335894/

相关文章:

android - 我们可以在 android 中一次在 Snack bar 中执行 2 个不同的操作吗?

android - Listview行requestLayout()和View回收

android - 如何在手机处于深度 sleep 状态时在 android + pjsip 上接听电话

java - Android - 如何根据 if else 语句的返回值设置界面颜色

android - 多设备布局问题

android创建下拉列表

android - 如何改进 Android Eclaire 上的 WebView?

Android 视频流上传到 php 服务器?

javascript - 'appendBuffer'上执行 'SourceBuffer'失败 : The HTMLMediaElement. 错误属性不为空

android - 如果我以编程方式更改 fragment ,如何更改底部导航图标颜色