Re sizing of layout not smooth when content within is changed dynamically

view story

http://stackoverflow.com – I am creating a Linear layout ,which internally consists of two views(linear layouts) which are expanded and collapsed onclick. This layouts inturn have a list of linear layout whose child is a Relative layout containing 2 layouts (linear)which are swapped and shown each time when clicked. Depending on the data set to the inner layouts the size of the main linear layout changes. Although, this is the expected behavior the re-sizing of the layout is too fast and gives a jerky feeling. Is there anyway to make the re-sizing and transition of the main layout smoother? The code I have so far i (HowTos)