how could find out the end of text position in textview?

风格不统一 提交于 2019-12-22 21:59:10

问题


after asking a question about Place Button just after end of TextView in multilline TextView I give no answer but I think if find the position of end character of final line of textview , then my problem is solved .
so how could find out the end of text position in last line of textview?
tank's for your help and your attention.


回答1:


CharSequence cs = textView.getText();
int position = cs.charAt(cs.length()-1);


来源:https://stackoverflow.com/questions/17306961/how-could-find-out-the-end-of-text-position-in-textview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!