I have some critical issue related to height of TextView. I want to set the height of the TextView based on the content which is set at runtime.
Here is my xml code:-
Here is the java code to set the height of the TextView:-
TextView tv = (TextView) findViewById(R.id.tv);
int height_in_pixels = tv.getLineCount() * tv.getLineHeight();
But the problem is; it displays only 1 line, and not the rest of the lines.
I'm having the exact same problem here.
Did you find a answer for yours?
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)