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
921 stars 77 forks source link

Padding at left/right/bottom? #54

Closed toto263 closed 3 years ago

toto263 commented 3 years ago

Is it possible to add padding at left/right and bottom of the dialog to look like iOS UIAlertViewController?

ios-action-sheet-simulator

maxkeppeler commented 3 years ago

If you mean a padding on the left and right side of the whole component, then yes. You can create a padding by limiting the width of the component itself. Usually it's used when in landscape mode or on a table to prevent it from taking up the whole width of the screen. But it can be used to create a horizontal padding as well.

A padding on the bottom, as well as the separated look between the cancel and options view as you show in the screenshot is not possible. It applies a shape behind the whole bottom-sheet or dialog view. So a padding at the bottom would just leave a white area instead of a transparent one. If you really desire to have this look, feel free to fork this project and make changes on the layout files and the way it applies the background shape, then you can achieve it certainly!