maxkeppeler / sheets

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
https://maxkeppeler.github.io/sheets/
Apache License 2.0
923 stars 77 forks source link

Rename peekHeight to peakHeight #3

Closed mbilalakmal closed 3 years ago

mbilalakmal commented 3 years ago

If I understand correctly setting the peekHeight will set the maximum height of the bottom sheet. The correct term would be peak in that case.

maxkeppeler commented 3 years ago

This might be a bit confusing at first glance, but it is correct.

The peekHeight is the height of the bottom sheet when it is collapsed state.

Google used the term peek (peep, at first glance, snap a look, ...) to describe the visual maximum height of the bottom sheet when it's in the collapsed state.

You can pull the bottom sheet up, which puts it into the expanded state, either until it fits to the height of the content or until the maximum available height on the screen, which could be described as the peak.

See the method in the BottomSheetBehavior class by Google: https://developer.android.com/reference/com/google/android/material/bottomsheet/BottomSheetBehavior#setpeekheight

Hope that makes it clear!