Giter VIP home page Giter VIP logo

Comments (11)

PedroMobile avatar PedroMobile commented on June 17, 2024

is bug on ViewPagerRunnableAdapter?

from smooth-app-bar-layout.

henrytao-me avatar henrytao-me commented on June 17, 2024

Yes, it is. However, the root cause is from SmoothAppBarLayout.onScrollChanged. It's tricky to sync header (toolbar + tabLayout) offset when switching between tabs because their scroll offset are different.
SmoothViewPager doesn't have any problem in QuickReturn mode.
SmoothViewPager and SmoothViewPagerRunnable have the same problem because they are in ExitUntilCollapsed mode. For me, it's quite minor but it's good to have an improvement.

If you have any idea, feel free to discuss.

from smooth-app-bar-layout.

eneim avatar eneim commented on June 17, 2024

Hi. I want to contribute to this library. But it turns out that you have your customize version of RecyclerView which cause some troubles. What is the point of that? IMO multi-layer custom dependencies is not a good practice for open source though. Please consider to put your extension of RecyclerView in this library or even consider to remove them. Using as close to the original one is best for other user to adapt your idea I suppose :D.

from smooth-app-bar-layout.

henrytao-me avatar henrytao-me commented on June 17, 2024

Can you explain more about the issue of RecyclerView?

I did use custom RecyclerViewAdapter, not RecyclerView. Also, the library itself doesnt depends on RecyclerViewAdapter, just the example has it as dependency.

from smooth-app-bar-layout.

eneim avatar eneim commented on June 17, 2024

Yes, but it (your custom Adapters) depends on some component of RecyclerView, for example: the LayoutManager. Furthermore, I figure out that the main problem was the proguard script which changes the LinearLayoutManager class name, therefore RecyclerView could not recognize it again. Please take care of proguard script for UI components.

About the idea of your library, the header view approach is not my style always. But i want to take a look again :D.

from smooth-app-bar-layout.

henrytao-me avatar henrytao-me commented on June 17, 2024

Hi @eneim
I sent another PR for fixing proguard internally. You don't have to specify this library in your proguard file anymore.

If some how Support Design version xxx can fix the laggy issue with non-header approach, we can move back to origin. For now, most of Google Apps (Inbox, Google Play, Google Contact...) are using header approach (I believe).

If you have any idea or found something are interesting, don't hesitate to share here. Thanks a lot!

from smooth-app-bar-layout.

Deepankur-Sadana avatar Deepankur-Sadana commented on June 17, 2024

Hi @henrytao-me, I have an idea to solve this bug. When you scroll back to the 1st viewpager which has x offset, the AppbarLayout should come down only at the top of the recycler view (essentially after scrolling back to the 1st entry). Any recommendations of how we could achieve that?

from smooth-app-bar-layout.

henrytao-me avatar henrytao-me commented on June 17, 2024

Hi @Deepankur-Sadana, the tricky part is calculating totalScrollOffset of RecyclerView which I still don't know what is the best solution.

from smooth-app-bar-layout.

Deepankur-Sadana avatar Deepankur-Sadana commented on June 17, 2024

Hi @henrytao-me , no problems I am on it. I will have you know the solution if I am able to deal with it .
I appreciate you for acknowledging the concern.

from smooth-app-bar-layout.

henrytao-me avatar henrytao-me commented on June 17, 2024

Thanks a lot. Let me know if you find something interesting.

from smooth-app-bar-layout.

henrytao-me avatar henrytao-me commented on June 17, 2024

Hi @PedroMobile @eneim @Deepankur-Sadana

Check out v1.0.2. ViewPager now supports exitUntilCollapsed and quickReturn too. They are all interesting.

from smooth-app-bar-layout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.