Code Monkey home page Code Monkey logo

Comments (4)

itgowo avatar itgowo commented on July 17, 2024

默认textview就是支持emoji的,具体风格由系统rom决定,有的rom是和ios一致,有的rom是原生Android的,是谷歌提供的,如果要自己根据内容自定义添加emoji表情,你需要知道unicode编码,根据一定长度读出数据,判断数据对应的图片,再用imageSpan加载,添加到textview指定位置上,你可以参考emoji键盘的一些demo

from commentlisttextview.

itgowo avatar itgowo commented on July 17, 2024

也可以像qq微信那样自定义规范,特定字符串代表某一个表情,不过维护成本很高,与其他显示效果不兼容

from commentlisttextview.

devecc avatar devecc commented on July 17, 2024

开始也想的自定义编码,在控件里面用正则匹配替换图片。为了方便就用默认的,不知道老版Android是不是支持不全,和ios 个别表情有兼容问题。

from commentlisttextview.

itgowo avatar itgowo commented on July 17, 2024

肯定有不能识别的,新的ios系统自己加了几十个表情,Android是没法匹配的,用一个默认图代替吧

from commentlisttextview.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.