material-components / material-components/material-components-android
[BottomSheetBehavior] Set initial state in XML
Open
Nobody has claimed this yet.
feature request
Widget: BottomSheet
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
So I don't have to do this in onViewCreated:
```
val bottomSheet = BottomSheetBehavior.from(binding.bottomSheetFeatures)
if (bottomSheet.isHideable) bottomSheet.state = BottomSheetBehavior.STATE_HIDDEN
```
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.
Research direction
Start by locating BottomSheetBehavior and its XML attribute handling; the issue does not name a file or test. Check how the initial state is currently represented, then verify that an XML-configured hidden state works without the onViewCreated assignment and add or update the relevant coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100