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,
- you take the data using getText() for the view.
- use StringTokenizer and go to the last line.
- Check if you have less than 10 characters
- Do your task or removing.
精彩评论