Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SideSheet] Modal SideSheet's SideSheetCallback's onSlide() is not called #3167

Closed
manabu-nakamura opened this issue Jan 6, 2023 · 1 comment

Comments

@manabu-nakamura
Copy link
Contributor

Description: Modal SideSheet's SideSheetCallback's onSlide() is not called (modal BottomSheet's BottomSheetCallback's onSlide() is not called, too). After the modal SideSheet is dragged once, onSlide() will be called.
Screenshot_20230106_093622

Expected behavior: onSlide() is called.

Source code: https://github.com/material-components/material-components-android/tree/master/catalog/java/io/material/catalog/sidesheet/SideSheetMainDemoFragment.java#L278-L282
https://github.com/material-components/material-components-android/blob/master/catalog/java/io/material/catalog/sidesheet/SideSheetMainDemoFragment.java#L114-L119

Minimal sample app repro: Catalog app

Android API version: 33

Material Library version: 1.8.0-beta01

Device: Emulator 31.3.14

@afohrman
Copy link
Contributor

afohrman commented May 3, 2023

Thanks for reporting! This is actually a catalog bug, not a modal side sheet bug. What's happening is that the slide offset text view (and the state text view, if you look carefully) are not updated until the first drag, because up until that point, only the dialog window animations have run, and the values are only initialized in the callback. I have a internal change out to fix this issue in the catalog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants