[MaterialTimePicker] broken layout if reusing MaterialTimePicker
See original GitHub issueDescription: I am creating a MaterialTimePicker Instance and showing it in an DatePicker.addOnPositiveButtonClickListener method. The problem is that the layout is broken if I try to show that TimePicker instance again after closing the first one.
Expected behavior: If the MaterialTimePicker is called a second time, the layout should be shown as usual.
Source code:
MaterialDatePicker.Builder.datePicker()
val builder = MaterialDatePicker.Builder.datePicker()
val pickerDialog = builder.build()
val timePicker =
MaterialTimePicker.Builder().setInputMode(MaterialTimePicker.INPUT_MODE_CLOCK)
.setTimeFormat(TimeFormat.CLOCK_24H).build()
pickerDialog.addOnPositiveButtonClickListener {
timePicker.show(childFragmentManager, pickerDialog.tag)
}
timePicker.addOnPositiveButtonClickListener {
}
view.findViewById<Button>(R.id.button_first).setOnClickListener {
pickerDialog.show(childFragmentManager, "")
}
Android API version: API 30
Material Library version: 1.3.0-alpha04
Device: Google Pixel 3a
To help us triage faster, please check to make sure you are using the latest version of the library.
We also happily accept pull requests.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
setting wdullaer/MaterialTimePicker Time limit values in not ...
as expected from the documentation the time picker has a setMin/MaxTime() methods but when using it in the project none exists! android ...
Read more >MaterialTimePicker - Styling Android
At the start of this article, I mentioned that there is currently a gotcha which can break the layout of MaterialTimePicker .
Read more >MaterialTimePicker - Android Developers
Used to create MaterialTimePicker instances. ... The supplied listener is called when the user cancels the picker via back button or a touch ......
Read more >jetc.dev Newsletter Issue #125
Compose Compiler now has a 1.3.0-beta01 , independent of the other ... and MaterialTimePicker from the Material Components for Android, ...
Read more >Google rolling out Material time picker redesign on Android
The time picker UI across Google's Android apps are getting updated to a new, more touch-friendly design. Ahead of the Material You...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just happened to me right now
As #1995 was closed this can also be closed because this question is just a duplicate.