Skip to content

Conversation

@ryohji
Copy link
Contributor

@ryohji ryohji commented Jan 7, 2020

The TabLayoutMediator constructed with autoRefresh = false is crashed when calling detach. Because pagerAdapterObserver remained null on attach and then on detach adapter.unregisterAdapterDataObserver(pagerAdapterObserver) throws IllegalArgumentException.

Thanks for starting a pull request on Material Components!

Don't forget:

  • Identify the component the PR relates to in brackets in the title.
    [Buttons] Updated documentation
  • Sign the CLA bot. You can do this once the pull request is opened.

Contributing
has more information and tips for a great pull request.

The `TabLayoutMediator` constructed with `autoRefresh = false` is crashed when calling `detach`. Because `pagerAdapterObserver` remained `null` on `attach` and then on `detach` `adapter.unregisterAdapterDataObserver(pagerAdapterObserver)` throws `IllegalArgumentException`.
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@ryohji
Copy link
Contributor Author

ryohji commented Jan 7, 2020

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes and removed cla: no labels Jan 7, 2020
Copy link

@cane612 cane612 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a mandatory check if you are reusing TabLayoutMediator instance with condition autoRefresh is false. @ryohji nice contibution

Copy link
Contributor

@pekingme pekingme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this, LGTM.

@pekingme pekingme added the Reviewing Internally An internal change has been created and sent for review. label Jan 9, 2020
@pekingme pekingme self-assigned this Jan 9, 2020
@pekingme pekingme closed this in 07931b6 Jan 9, 2020
@pekingme pekingme added Merged and removed Reviewing Internally An internal change has been created and sent for review. labels Jan 9, 2020
ikim24 pushed a commit that referenced this pull request Jan 17, 2020
Resolves #877

GIT_ORIGIN_REV_ID=db2949c4ed5358867e83b3e1cabad00e574ba5ba
PiperOrigin-RevId: 288822885

(cherry picked from commit 07931b6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants