android - 有没有办法在android上使用json格式的表情?
问题描述
我想从 emoji-datasource 站点接收表情符号作为 json 文件并在 android 中显示。你怎么做呢?json格式的文件是:
[
{
"name": "HASH KEY",
"unified": "0023-FE0F-20E3",
"non_qualified": "0023-20E3",
"docomo": "E6E0",
"au": "EB84",
"softbank": "E210",
"google": "FE82C",
"image": "0023-fe0f-20e3.png",
"sheet_x": 0,
"sheet_y": 0,
"short_name": "hash",
"short_names": [
"hash"
],
"text": null,
"texts": null,
"category": "Symbols",
"sort_order": 132,
"added_in": "0.0",
"has_img_apple": true,
"has_img_google": true,
"has_img_twitter": true,
"has_img_facebook": false
},
{
"name": null,
"unified": "002A-FE0F-20E3",
"non_qualified": "002A-20E3",
"docomo": null,
"au": null,
"softbank": null,
"google": null,
"image": "002a-fe0f-20e3.png",
"sheet_x": 0,
"sheet_y": 1,
"short_name": "keycap_star",
"short_names": [
"keycap_star"
],
"text": null,
"texts": null,
"category": "Symbols",
"sort_order": 133,
"added_in": "0.0",
"has_img_apple": true,
"has_img_google": true,
"has_img_twitter": true,
"has_img_facebook": false
},
...
]
链接在这里:https ://www.npmjs.com/package/emoji-datasource 。我尝试了以下但没有奏效。
textView.text = String(Character.toChars(0x002AFE0F20E3))
我想向用户展示 Android 设备上可用的所有表情符号。
解决方案
哦,我解决了。只需在 json 文件google
名代码中使用。
推荐阅读
- rest - 对查询 consoleText 的调用返回 HttpStatus 100 - 如何处理?
- python - 使用 pip install 下载需求时出错(安装命令:use_2to3 无效。)
- inheritance - 如何使用 Jackson 反序列化 Json Schema?
- python - discord.py 关于频道消息的问题
- react-native - 使用 react-native-safe-area-context 测试组件时出现问题
- python - 使用 pdftotext 提取特定数据
- amazon-redshift - 使用 S3 URI 显示的 Redshift 系统视图
- flutter - 如何在 Flutter 中为二维数组创建空列表
- android - 即时交付的模块化应用程序的项目结构
- jenkins - 无法在 jenkins v2.309 中创建“新工作”,确定按钮已禁用