Closed pocmo closed 7 years ago
+1, let's match that Share sheet
The fix I landed makes the dialog much taller. It looks like it's using a 16:9 keyline relative to the width of the dialog (as opposed to 16:9 keyline relative to the whole screen, which is what the system one does). I'll see if I can fix that too.
Ignore my previous comment: the reason the dialog was previously showing only 1 line was because it was using a 16:9 keyline relative to the entire screen.
The system version uses 50% of the screen height, which isn't explicitly mentioned in the spec - but that's what the example tablet screens show: https://material.io/guidelines/components/bottom-sheets.html#bottom-sheets-modal-bottom-sheets
I've updated the heights to match what Android does on my N9 (approx 320dp height, although it reduces the height slightly below that in landscape - which is odd):
I'm slightly concerned that the system share dialog size might vary on other devices (I've only tested with an N9 so far). Another potential issue is that we enable this for sw600dp and larger, I don't know what criteria Android uses to decide the BottomSheet size.
(It seems that the system share dialog uses a completely separate implementation to the support library, since I haven't found any code explaining even the height that they use on tablets, or even code that makes the dialog narrower on tablets. I haven't found the system implementation yet.)
Our "open with" screen:
Compare with native "Share" screen:
And while we are fixing that... the initial height of the bottom sheet is weird on tablets. It's only showing one option and therefore looks like that's all there is: