Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android BottomSheet jumps up when content changes

I using BottomSheet in my app. This is a sticky bar aligned to the bottom, and shows total price in collapsed mode. User can drag up to see details. My problem is: When the user change the content (add some stocks to the list) and the layout is changing in the collapsed sticky, its jumps up to the full size. No methods called in the BottomSheetCallback, so the transition animations is not working.

BTW i have the same issue in the CollapsedToolbarLayout.

Anybody can help me to avoid this issue?

UPDATE

This problem caused by android:animateLayoutChanges = "true" in the BottomSheet layout's content. This will cause the same problem in the CollapsedToolbarLayout. I hope this will help somebody :)

like image 398
Apoth Avatar asked Jul 06 '17 08:07

Apoth


1 Answers

Remove android:animateLayoutChanges = "true"

like image 103
Asiri H. Avatar answered Nov 14 '22 04:11

Asiri H.