tags:

views:

61

answers:

1

Hi Everybody,

I want to get height of TextView and line number currently shown in that TextView.

How can I do that can any body help me about this matter ??

Thanks

A: 

You can obtain the height in pixels of a currently displayed TextView by calling the getHeight() method.

If you divide this figure by the result of the getLineHeight() method, this should tell you how many lines are currently visible.

Jim Blackler
also, make sure that you are calling getHeight() only after the view is measured.
Samuh