I set animateLayoutChanges=true in my code, to animate the options item I have in my fragments.

When I open the PreferenceFragment I enable the up navigation icon, then I disable it when I close it, but it behaves in a strange way, leaving a sort of padding to the left of the title, where the NavigationIcon was.

Here's a gif showing what's happening:

[![img](https://i.stack.imgur.com/4PCZz.gif)](https://i.stack.imgur.com/4PCZz.gif)

Do you guy's have any idea on why is this happening?
I searched far and wide on the internet, but found nothing.

Is there any workaround to animate these items in the same way?
Thanks.