Aelexe
Aelexe

Reputation: 1226

Android - Get size of TextView content

I currently have TextViews containing HTML content, including different sized text and images.

The TextViews are aligned to other views in such a way that only three lines of the content is shown to the user.

Is there anyway to get the height the TextViews would take up if they were expanded to the size of their content?

Upvotes: 1

Views: 1639

Answers (1)

fullahouse
fullahouse

Reputation: 141

try this: TextView.getLayout().getHeight();

Upvotes: 6

Related Questions