henrytao-me / smooth-app-bar-layout

Smooth version of Google Support Design AppBarLayout
Apache License 2.0
1.77k stars 240 forks source link

setExpanded with animation does not seem to work #185

Closed jonschmidt closed 7 years ago

jonschmidt commented 7 years ago

Hi Henry,

Thanks for trying to provide a workaround for everyone who is frustrated with the support library. I have a simple question. What is the recommended behavior for using setExpanded with an animation? It does not seem to work at all, as in the appbarlayout closes (using the underlying appbarlayout animation logic), but the recyclerview does not scroll at all. I have to create functionality where we can programatically close the appbarlayout with an animation or we cannot make use of the library.

This should be 100 percent reproducible with your samples without me providing anything. Just call setExpanded(false, true) on the appbarlayout and watch what happens.

Thanks for the hard work!

henrytao-me commented 7 years ago

Hi @jonschmidt

Thanks for using this library. SmoothAppBarLayout is one way binding which mean it only can scroll if and only if scroll view has enough height and scroll event happens. That ends up setExpanded(false, true) won't work properly.

I just investigate and have a quick solution for this issue. I will send an update soon. What version of AppCompat and SupportDesign are you using?

jonschmidt commented 7 years ago

We are currently on 25.0.1. Thanks for looking into it.

henrytao-me commented 7 years ago

Hi @jonschmidt

Please try v25.0.1.1. Let me know if it fixed for you. Are you working at SoundCloud? That's a great company.

Cheers, Henry

jonschmidt commented 7 years ago

Hi Henry.

Thanks for the quick update. I do work there, yes. Thanks!

I have some new requirements that might lead me to not be able to make use of the library, but if not I will make sure you get credited for your work and get you any feedback I have.

Jon

henrytao-me commented 7 years ago

Hi @jonschmidt

If you have any concerns, feel free to let me know.

Cheers, Henry