MaterialDialog-Android icon indicating copy to clipboard operation
MaterialDialog-Android copied to clipboard

Update Needed to Improve UI When Buttons Are Not Required

Open sazal-ns opened this issue 1 year ago • 0 comments

Hello @PatilShreyas,

I am using your library in my recent project and found that if I remove buttons, it creates a blank space which looks odd. Upon further investigation, I found that the buttons are set to "INVISIBLE" mode when they are null, which is causing the blank space to appear.

To resolve this issue for my current project, I modified the library code to set the buttons to "GONE" when they are null.

I believe this is a minor change that can easily be implemented, and I wanted to suggest it to the author. I cloned the library's repo, made the necessary modifications, and tested them in my project, which worked perfectly.

If you agree with my solution, I would be happy to contribute by submitting a pull request with the change

Thank you for creating this useful library, and I hope my feedback can help improve it for the entire community. If you need any further information or clarification, please let me know.

https://github.com/PatilShreyas/MaterialDialog-Android/blob/e3338c6c1a69f351b85e4c98633b835917ee1452/MaterialDialogLibrary/src/main/java/dev/shreyaspatil/MaterialDialog/AbstractDialog.java#L122

https://github.com/PatilShreyas/MaterialDialog-Android/blob/e3338c6c1a69f351b85e4c98633b835917ee1452/MaterialDialogLibrary/src/main/java/dev/shreyaspatil/MaterialDialog/AbstractDialog.java#L137

sazal-ns avatar Apr 15 '23 20:04 sazal-ns