在textview中如何找出文本位置的结尾? [英] how could find out the end of text position in textview?

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

问题描述

在提出关于紧随后放置按钮的问题后多边形TextView中的TextView结束
我没有给出任何答案,但是我觉得如果找到textview的最后一行的结尾字符的位置,那么我的问题就解决了。

那么怎么可能找出textview的最后一行的文本位置的结尾?

坦克的帮助和你的注意力。

解决方案

  CharSequence cs = textView.getText(); 
int position = 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天全站免登陆