android - Limiting number of lines in a String dynamically -


i have string long paragraph. displaying string various items of listview.

i want every alternate item of listview have dynamic number of lines/ words in string. eg. if first item has 2 lines, 2nd item should have 3 lines.

this code:-

mydescription = mydescription.substring(0, math.min(mydescription.length(), 50)); viewholder.description.settext(mydescription); mydescription =html.fromhtml(song.getbody()).tostring();  

how can this?

i have 1 idea item

    position  

of item. suppose item means

   position ==0 , line number =2 , position == 1 line number =3 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -