perhaps after that for the cycle you draw the estimated * additional lines.
getHeight () will return the EditText height in pixels getLineHeight () will have the height of one standard line
therefore getHeight / getlineHeight-getCount will contain the number of lines to draw.
you cannot use getLineBounds using the functions above, you could calculate the position of the remaining lines to draw.
* It is believed that formatting text can change the height of a line, but since there is no text in these lines, this should not be a problem. But for the same reason, you should draw the remaining lines, and not use this to draw all the lines.
source share