1. Are you ready for the Galaxy S20? Here is everything we know so far!

Make child views move with animation when a view in a vertical linear layout expands

Discussion in 'Android Development' started by janhrabe, Feb 10, 2021.

  1. janhrabe

    janhrabe Lurker
    Thread Starter

    I'm trying to replicate a recycler view visual effect in a linear layout, where views transition to their new position with animation if a view in the list has expanded. I have some predefined custom views (the view extends LinearLayout class, in XML I fill them with additional views, I just haven't figured out a way of doing it through a list, that would be more practical than the linear layout option), which I add in XML to a linear layout with vertical orientation. When a view inside the layout changes its size, views move to their new position instantly. Is there a way to animate this effect in linear layout?

    Desired effect:

    Current Effect:

    1. Download the Forums for Android™ app!



Share This Page