GithubHelp home page GithubHelp logo

sunhapper / spedittool Goto Github PK

View Code? Open in Web Editor NEW
339.0 8.0 64.0 5.01 MB

An efficient and scalable library for inputing and displaying gif or @mention on graph-text mixed TextView/EditText

License: MIT License

Kotlin 100.00%
edittext mention gif android-library android-ui textview glide drawable emoji-android emoji

spedittool's People

Contributors

sunhapper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spedittool's Issues

添加依赖无法通过编译

你好,我添加依赖之后,编译无法通过,但是把你的libary下载下来加到项目中,让app添加这个libary是么问题的编译也正常通过,原因貌似是我项目中用的Glide是3.7的而你的是用的4.0的,我猜想添加你的依赖之后可能把你的demo的gradle也添加过来了,导致编译无法通过

当我把@信息保存为草稿时,再次使用期@属性丢失。

感谢您的开源,我在项目中使用了您的工程,现在我有个问题当我在聊天页面有@信息时,使用是正常,但是当我把@信息保存为草稿时,再次进入取出草稿里的@信息时,这时就是一个普通的字符串了,此时我应当怎么做。如果有时间请您回复下。谢谢!

IsoheightImageSpan 在部分手机上getSize返回0的问题

override fun getSize(paint: Paint, text: CharSequence,
start: Int, end: Int, fm: FontMetricsInt?): Int {
if (fm != null && paint.fontMetricsInt != null) {
//paint.getFontMetricsInt() 和 参数中FontMetricsInt不是同一个对象,数据不同
// FontMetricsInt会变化,paint.getFontMetricsInt()会和TextView的文字大小保持一致
val paintFontMetricsInt = paint.fontMetricsInt
drawableHeight = paintFontMetricsInt.descent - paintFontMetricsInt.ascent
}
val drawable = getResizedDrawable()
val bounds = drawable.bounds
return bounds.right
}
此处方法入参的fm在部分手机上为null,导致drawableHeight为0,最终导致getSize()方法获取不到宽度。

换行

是否可以支持@的换行

关于SelectDeleteKeyEventProxy

HVBG`P2GJ{NAD_XO{F9Y1

I2S8L%WT71`C5HL0X)(ZTMS
可以通过替换效果的方式设置删除选中状态spanStringBg,但是需要处理一下选中后不删除,光标移动,需要重新设置为spanStringFore的非选中状态效果(spanStringBg相比spanStringFore多设置一个BackgroundColorSpan属性)

导入工程一直失败

换了一个demo也一样

ERROR: Failed to resolve: com.github.sunhapper:SpEditTool:SpEditText

如果需要动态匹配表情该如何实现

首先感谢作者的开源库,不过我遇到了一个问题
比如我想实现类似朋友圈列表那样的文字和gif表情展示,后台可能返回这样一串文本
“今天天气很好[emt]3[/emt]”,客户端需要使用正则表达式去动态匹配并显示gif,但是我看了demo并尝试按照上面的规则显示gif,却没有显示出来

RecyclerView使用时有性能问题

  1. 我作为消息列表, 在recyclerView里面使用的时候, 内存会上涨非常厉害, 而且释放很慢, 由于一直要刷drawable, 所以CPU的使用情况也很高.
  2. 没有办法在item里面动态去添加gif, 必须要先把gif初始化出来以后才能使用

IllegalArgumentException: PrecomputedText's Parameters don't match the parameters of this TextView.Consider using setTextMetricsParams(precomputedText.getParams()) to override the settings of this TextView: PrecomputedText:

Caused by: java.lang.IllegalArgumentException: PrecomputedText's Parameters don't match the parameters of this TextView.Consider using setTextMetricsParams(precomputedText.getParams()) to override the settings of this TextView: PrecomputedText: {textSize=45.0, textScaleX=1.0, textSkewX=0.0, letterSpacing=0.0, textLocale=[zh_CN], typeface=android.graphics.Typeface@5cb73da, variationSettings=null, elegantTextHeight=false, textDir=android.text.TextDirectionHeuristics$TextDirectionHeuristicInternal@a4e222a, breakStrategy=0, hyphenationFrequency=0, lineBreakStyle=0, lineBreakWordStyle=0}TextView: {textSize=45.0, textScaleX=1.0, textSkewX=0.0, letterSpacing=0.0, textLocale=[zh_CN], typeface=android.graphics.Typeface@5cb73da, variationSettings=null, elegantTextHeight=false, textDir=android.text.TextDirectionHeuristics$TextDirectionHeuristicInternal@a4e222a, breakStrategy=0, hyphenationFrequency=0, lineBreakStyle=0, lineBreakWordStyle=0}
2.at android.widget.TextView.setText(TextView.java:6554)
3.at android.widget.TextView.setText(TextView.java:6472)
4.at com.sunhapper.x.spedit.view.SpXTextView.setText(SpXTextView.java:36)
5.at android.widget.TextView.setText(TextView.java:6424)

闪退

demo点击表情之后选择#topic#然后删除会闪退

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.