如何能找到的文本位置在TextView中结束了吗? [英] how could find out the end of text position in textview?

查看:120
本文介绍了如何能找到的文本位置在TextView中结束了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问一个关于<一个问题后, href=\"http://stackoverflow.com/questions/17290001/place-button-just-after-end-of-textview-in-multilline-textview\">Place巴顿刚刚在multilline的TextView 的TextView结束之后
我给没有答案,但我想,如果找的TextView的最后一行的末尾字符的位置,那么我的问题就解决了​​。结果
所以如何能找到在TextView中的最后一行文本位置结束了吗?结果
坦克的帮助和您的关注。


解决方案

 的CharSequence CS = textView.getText();
INT位置= cs.charAt(cs.length() - 1);

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.

解决方案

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

这篇关于如何能找到的文本位置在TextView中结束了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆