sadegh saati
sadegh saati

Reputation: 1170

Scale view size does not affect position of adjacent views

There are some circle(Custom View) in a vertical layout and I animate height of circles by tapping them .(by property animation) but enlargement of these views do not affect position of circles before and after them. how can I do that?

Upvotes: 2

Views: 1935

Answers (1)

matiash
matiash

Reputation: 55380

A scale animation changes the way a view it's drawn, but it doesn't affect the parent's layout. What you need in this case is to update its LayoutParams (via an animation) so that the position of any other controls are adjusted accordingly.

See this answer for an excellent sample.

Upvotes: 2

Related Questions