开发者

multiline textview in android

in this activity, i have two textview in first textview, the last line has only two character so it looks like s开发者_StackOverflow中文版ome odd.

so i want to check the last line of textview, and if the number of character in last line is less than 10 then i want to remove that character from line 1.

so how can i get the last line characters? help me


Hope you are using EditTextView or TextView for this.

If so,

  1. you take the data using getText() for the view.
  2. use StringTokenizer and go to the last line.
  3. Check if you have less than 10 characters
  4. Do your task or removing.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜