• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

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

janhrabe

Lurker
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:
ezgif-6-ce8dab9cf472.gif


Current Effect:
ezgif-6-d52883e16735.gif
 
Back
Top Bottom