Hi Gurus,
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:-
<TextView android:id="@+id/tv"
android:layout_width="fill_parent" android:layout_height="wrap_content"/>
Here is the java code to set the height of the TextView:-
`TextView tv = (TextView) findViewById(R.id.tv);
tv.invalidate();
int height_in_pixels = tv.getLineCount() * tv.getLineHeight();
tv.setHeight(height_in_pixels);`
But the problem is; it displays only 1 line, and not the rest of the lines.