material-components / material-components/material-components-android
BottomSheetBehavior header disappears when calling setState()
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
See attached sample project. It's pretty self-explanatory. Bug confirmed in version `1.2.0` (running Android 10).
When the header of the BottomSheetBehavior is scrolled out of view, and you then call `setState(STATE_HALF_EXPANDED)` (e.g. from a button/timer or whatever) the header will disappear.
I believe `STATE_EXPANDED` and `STATE_COLLAPSED` will show a similar issue. Is there a workaround? A missing `requestLayout()` somewhere?
[BottomSheetBug.zip](https://github.com/material-components/material-components-android/files/5187904/BottomSheetBug.zip)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.