Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting offset listener to CollapsingToolbarLayout

I'm trying to set an offset listenter to CollapsingToolbarLayout to animate other objects in a synchronized way while user scrolls down or up. Does anybody have an idea?

like image 893
HaDenG Avatar asked Nov 09 '22 11:11

HaDenG


1 Answers

Assuming your toolbar is a direct child of AppBarLayout, you can add an AppBarLayout.OnOffsetChangedListener on the AppBarLayout.

like image 91
Andrew Avatar answered Nov 14 '22 22:11

Andrew