material-components / material-components/material-components-android
[MaterialDatePicker] Make the class open*.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
Is your feature request related to a problem? Please describe.
I would suggest the class to be made public open, so we could attach the selection listener in a subclass and use "sharedViewModel" to deliver the selected date. At the moment in case of screen rotation, we need to detach the listeners and reattach when the new fragment is ready to avoid a memory leak.
Describe the solution you'd like
Make the class public.
Describe alternatives you've considered
Maybe another way to avoid subclassing it would be the old fashion OnInteractionListener on the parentFragment / activity.
We also happily accept pull requests.
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 at the MaterialDatePicker entry point and review how selection listeners are currently attached across fragment recreation. Compare the requested subclassing approach with the proposed parentFragment or activity listener alternative. Done means the supported API clearly enables the intended listener and sharedViewModel use without requiring manual listener detachment during rotation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- api, mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100