Is there any way to customize the Material 3 DateP...
# compose
s
Is there any way to customize the Material 3 DatePicker sizes? That thing is really huge on small screens like the iPhone 12 Mini. 7 buttons for the weekdays don't fit on the screen if everyone is 48.dp and also has some padding. I want to remove the padding and reduce the button sizes to 44.dp or 40.dp. It seems not possible. Is it?
a
Modifier.scale(.9f) 😃 Or you can provide smaller LocalDensity for picker composable
There is also a thing called
LocalMinimumInteractiveComponentEnforcement
. Probably it can help to reduce buttons size
s
Thank you! 🙏
👌 1
Unfortunately Modifier.scale() does not help that much, because on the limited space it first renders wrong and gets scaled afterwards, but keeps the wrong layout.
LocalDensity works in general, but the DatePicker behaves not good here. It adds up more padding.
I think I will go without a date picker in my app and use text fields. This DatePicker does not suit my needs. 😕
b
Could use iOS date pickers for iOS?
s
Yes, that would help me with the small iPhones. But aren't there also small screen Android phones? And it's a different design per platform 😕
I think I go with this for now 🤷‍♂️
HashPhotos does it this way 😅
s
But aren’t there also small screen Android phones?
Unihertz Jelly 2 is what you need here. I’ve bought one for the company recently and I always test new things on it. And yeah, m3 date picker just does not work well at all on it
👍 1
393 Views