TextView tv = (TextView) findViewById(R.id.TextView01);
final int height_in_pixels = tv.getLineCount() * tv.getLineHeight()
* getResources().getDisplayMetrics().density; //approx height text
tv.setHeight(height_in_pixels);
Solved: stackoverflow.com
No comments:
Post a Comment