Re: [android-developers] TextView maxLines based on height

2014-02-17 Thread Ankur Avlani
Hi, I guess now i have understood my issue and can explain it much better and clearly. I am loading all my view dynamically in a Horizontal ViewGroup. Inside one view there a collection of pictures along with text and the bottom. I have the width and height of the view fixed (When creating a

Re: [android-developers] TextView maxLines based on height

2014-02-15 Thread Ralph Bergmann | the4thFloor.eu
Am 13.02.14 03:54, schrieb Ankur Avlani: Can someone please suggest me some faster was to achieve my requirement. try this one: /** * Calculates the lines needed to show the text. * * @param paint * the TextPaint from the TextView * @param text * the text for the

[android-developers] TextView maxLines based on height

2014-02-12 Thread Ankur Avlani
Hi All, I am designing an native custom article view in android. My requirement is such that I have a long text which i need to break into pages. I can find out the total height of my TextView, how do i calculate the max visible lines for the view based on the height? I know Paint.breakText