Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于TextView的Spannable自定义部分字符串点击事件的自定义问题,例如@xxx 内容 #546

Closed
woniu0936 opened this issue Nov 22, 2016 · 4 comments

Comments

@woniu0936
Copy link

做评论的时候,一条评论里面可能有多个@xxx,而且整个item也有点击事件,这时候,不能写holder.addOnClickListener(R.id.textview),但是不写的话,事件会被SimpleOnItemClick覆盖,导致@xxx点击无效,请问针对这种场景,有相关的支持吗?

@AllenCoder
Copy link
Collaborator

目前针对Spannable还没有完美的解决办法,建议独立添加点击事件。后续会对这个功能进行扩展和完善

@woniu0936
Copy link
Author

@AllenCoder 好的

@psv100
Copy link

psv100 commented Nov 24, 2016

用ClickableSpan 单独设置点击事件后,点击TextView 波纹会变成从中间发散开, 如果再在XML文件单独给TextView设置波纹效果,点击后会产生 TextView本身、从中间发散两种波纹效果,有木有什么解决办法额。 @AllenCoder

@CymChad
Copy link
Owner

CymChad commented Nov 25, 2016

#500 待优化

@CymChad CymChad closed this as completed Nov 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants