Comments (4)
默认textview就是支持emoji的,具体风格由系统rom决定,有的rom是和ios一致,有的rom是原生Android的,是谷歌提供的,如果要自己根据内容自定义添加emoji表情,你需要知道unicode编码,根据一定长度读出数据,判断数据对应的图片,再用imageSpan加载,添加到textview指定位置上,你可以参考emoji键盘的一些demo
from commentlisttextview.
也可以像qq微信那样自定义规范,特定字符串代表某一个表情,不过维护成本很高,与其他显示效果不兼容
from commentlisttextview.
开始也想的自定义编码,在控件里面用正则匹配替换图片。为了方便就用默认的,不知道老版Android是不是支持不全,和ios 个别表情有兼容问题。
from commentlisttextview.
肯定有不能识别的,新的ios系统自己加了几十个表情,Android是没法匹配的,用一个默认图代替吧
from commentlisttextview.
Related Issues (5)
- 怎么没有第二张类似朋友圈的demo ? HOT 1
- 点击名字没反应 HOT 3
- RecyclerView 可以用吗
- 关于分割线
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commentlisttextview.