I want to get the number of lines of a text view
textView.setText(\"Test line 1 Test line 2 Test line 3 Test line 4 Test line 5.............\")
As mentioned in this post,
getLineCount() will give you the correct number of lines only after a layout pass.
getLineCount()
It means that you need to render the TextView first before invoking the getLineCount() method.
TextView