0

I have the following layout in my activity:

CoordinatorLayout ┣━ AppBarLayout ┃ ┗━ CollapsibleToolbarLayout ┃ ┣━ TextView (parallax) ┃ ┣━ TextView (pin) ┃ ┗━ Toolbar ┗━ NestedScrollView ┗━ LinearLayout ┣━ TextView 1 ┣━ LinearLayout 1 ┃ ┗━ 1 to n Views (dynamically added/removed) ... ┣━ TextView n ┗━ LinearLayout n ┗━ 1 to n Views (dynamically added/removed)

When I set the animateLayoutChanges in the Layouts to true, then whenever a Layout change happens inside of the NestedScrollView the resulting layout overlaps with the contents of the AppBarLayout.

I tried the suggestions in this stackoverflow comment, But it didn't help.

Did anyone had a similar/the same problem and found a solution?

Community
  • 1
  • 1
ma cılay
  • 749
  • 1
  • 6
  • 19

1 Answers1

7

Try calling setAnimateParentHierarchy(false) on the animated layouts. http://developer.android.com/reference/android/animation/LayoutTransition.html#setAnimateParentHierarchy(boolean)

chriztofr
  • 71
  • 1
  • 2