• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Textview measure problem

id0001

Well-Known Member
I have encountered a problem with measuring the height of a textview. I can only seem to get the height for a textview with only 1 line of text but I need the height of the textview while wrapped.

My TextView's original height is 76dp (1 line of text)
My TextView's new height with more lines is still 76dp. Though it is displayed correctly.

Does anyone know how to get around this?

Help is very much appreciated.
 
I am trying to get the height of a textview with multiple lines of text. It only returns the height for 1 line of text (the standard height).

I need the height of the textview because I want to make it expand and collapse like the market app's description textbox does.
 
TextView is just a label, but can be modified to input text. EditText is most commonly used to input text.
 
I do not need to input text. It already has. I just need to find the actual height of the textview on the screen so I can expand and collapse the view when I click a button.
 
Back
Top Bottom