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

Observing TabLayout selection events throws cast exception #528

@d7knight

Description

@d7knight

I am using the latest androidx material dependency 11.1.0-beta01, upon subscribing to the RxTabLayout selectionEvents observable an exception is thrown

Exception
Caused by: java.lang.ClassCastException: com.jakewharton.rxbinding3.material.TabLayoutSelectionEventsObservable$Listener cannot be cast to com.google.android.material.tabs.TabLayout$BaseOnTabSelectedListener
Related Issue
Discovered another issue that was fixed in July for the selections observable was merged here #517 related to this issue #495

Potential Fix
The fix would be to make this listener in TapLayoutSelectionEventsObservable extend from BaseOnTabSelectedListener like the other fix I mentioned earlier in the related issue section

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions