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

当有系统自带emoj表情的时候,选中的位置会乱码 #9

Open
Alvin3225 opened this issue Apr 10, 2018 · 2 comments
Open

Comments

@Alvin3225
Copy link

当有系统自带emoj表情的时候,选中的位置会乱码

@Alvin3225
Copy link
Author

终于解决这个问题了,因为EditText本身可以对表情符选中,所以想到把TextView替换成EditText,布局中也是替换掉,并添加textIsSelectable=true这个属性让EditText不可编辑,添加一个背景,让EditText没有横线,代码中设置选中效果调用EditText.setSelection(int start,int end)方法即可解决,重置的时候,调用setSelection(0)

@liwuchen
Copy link

liwuchen commented Nov 25, 2018

并添加textIsSelectable=true这个属性让EditText不可编辑

textIsSelectable=true这个属性好像不是用来设置不可编辑的吧?应该是editable = false设置不可编辑……另外请教下,为什么EditText选中的表情就不会乱码?

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

2 participants