Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

ViewPager2 - slight disappointment. #252

@recodyx

Description

@recodyx

ViewPager2 is definitely not an improvement over ViewPager from my point of view.

Sorry I'm migrating from ViewPager right now and it's terrible.

  1. since always the method to add a listener was called add/setXXXListener. Now it's called registerXXXCallback. What's the point? Just wanted to be different?
  2. the "OnPageChangeCallback" is not an interface but an abstract class. WHY? God in heaven, why? This is a disaster. My fragment used to implement interface. Now I have to create a class, which I then have to connect to fragment somehow.... Custom ListenerInterface....
  3. now need TabLayoutMediator to link TabLayout with ViewPager2... why not just viewPager.attach(tabLayout) or something. Or why not do it the old way, when the TabLayout was part of ViewPager in layout xml, and thus linked.

Overall our code has become much more complex and less readable. Too bad.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions