i want to know how many line in my text view. i already set mytextview text, then i want to get how many line it take in mytextview.
i use mytextview.getLineCount()
You need to post method for fetching the lines counts. Here is the sample code
imageCaption.setText("Text Here"); imageCaption.post(new Runnable() { @Override public void run() { int lineCount = imageCaption.getLineCount(); Log.v("LINE_NUMBERS", lineCount+""); } });