henrytao-me / smooth-app-bar-layout

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

RecyclerView scrollToPosition doesn't affect app bar initially #174

Closed smelfungus closed 7 years ago

smelfungus commented 7 years ago

Easy reproducing with in-library sample: SmoothScrollParallaxActivity After line 91 add:

    vRecyclerView.postDelayed(new Runnable() {
      @Override
      public void run() {
        vRecyclerView.smoothScrollToPosition(30);
      }
    }, 2000);

RecyclerView will scroll down but app bar won't collapse. There is also an important note — if any manual interactions with RecyclerView are done before programmatic scroll — it will fire as it should. Am I missing something? Maybe it is needed to perform some kind of sync on initialization? Thank you in advance.

henrytao-me commented 7 years ago

Thanks for your feedback. The fix is on this PR https://github.com/henrytao-me/smooth-app-bar-layout/pull/176. I am about deploying to all release versions.

henrytao-me commented 7 years ago

Hi @DummyCo

What support lib version are you using?

henrytao-me commented 7 years ago

Please check TAGS section in this repo to see all supported version. Thanks. Let me know if you run into any other issues.

smelfungus commented 7 years ago

@henrytao-me, works like a charm now, thank you. 25.1.0 support version is used.

henrytao-me commented 7 years ago

Nice @DummyCo