iamageo / BeautifulDialog

🌈 A Beautiful Dialog Library for Android 🗨️
Apache License 2.0
40 stars 6 forks source link

feature: implement TOP position #28

Closed iamageo closed 8 months ago

iamageo commented 8 months ago

I am writing to suggest an enhancement for the Beautiful Dialog library. Currently, the library supports 'CENTER' and 'BOTTOM' as positioning options for dialogs. It would be highly beneficial to include a 'TOP' positioning option as well.

Preview

jsericksk commented 8 months ago

Taking advantage of this issue about positions, as small suggestions for improvement in the current code, I believe that the enum class POSITIONS (plural) could be POSITION (singular), combining with the current code (TYPE) and common convention. An AlertDialog is by default in the center of the screen, which is also possible to see in the main screenshots of the README, so I think its default position should be CENTER instead of BOTTOM, since it is the most expected by the user of the lib and he would not need to manually change it with position() to CENTER.

Of course, these are just small suggestions that I believe could be beneficial, but may not be of much use overall. :)

iamageo commented 8 months ago

Thank you very much for the suggestions @jsericksk, your line of thought makes perfect sense, taking advantage of the hook, open a PR with the improvements, I would love to have your contribution to the project!

gusoliveira21 commented 8 months ago

Hey guys, good afternoon. I uploaded a code that positions the dialog at the top of the layout, I would like a review. https://github.com/iamageo/BeautifulDialog/pull/29

iamageo commented 8 months ago

Implemented in #29 by @gusoliveira21 , thank you for awesome feaature!