Flipboard / bottomsheet

Android component which presents a dismissible view from the bottom of the screen
BSD 3-Clause "New" or "Revised" License
4.53k stars 594 forks source link

Fix initial bottom sheet height #166

Closed xiphirx closed 8 years ago

xiphirx commented 8 years ago

According to the material design specs (https://material.google.com/components/bottom-sheets.html#bottom-sheets-specs)

The initial height of a bottom sheet is relative to the height of the list items (or grid rows) it contains. A bottom sheet should not initially have a height beyond its 16:9 ratio keyline, depending on how much content it contains. Bottom sheets may be swiped up to fill the height of the screen, with content that then scrolls internally.

I noticed that the default height was simply set to height / 3, so this change makes it consistent with the guidelines, by defaulting to the 16:9 keyline.

btw I'm not happy with the function name hasTallerKeylineHeightSheet :)

xiphirx commented 8 years ago

Changed

markrietveld commented 8 years ago

Thanks for contributing!