Changing TextView MaxLines property with animation?

I have a TextView, the MaxLine property is set to X. When the user clicks the button, I would like to increase this X value to a larger Y. This works, but additional lines appear suddenly, without animation. Also, this TextView is on the ListView line (in case it matters, which I doubt).

In the new Android Market application, when you open the detailed view of the application, the details of the application. presented exactly as I would like to achieve. Initially, only 3 lines of text are displayed, then when the user clicks the more buttons, the remaining lines are expected.

Can someone explain to me how to achieve this effect?

thanks

+4
source share
1 answer

Combine the two layouts on top of each other, layout B on top of layout A.

When the user clicks the button, apply the animation to Layout B so that the y-position of the layout changes, increasing the value of y.

0
source

Source: https://habr.com/ru/post/1339817/


All Articles