avast / android-styled-dialogs

Backport of Material dialogs with easy-to-use API based on DialogFragment
Apache License 2.0
2.15k stars 450 forks source link

can I implement a custom view with a checkbox by extending SimpleDialogFragment #80

Closed Logan676 closed 9 years ago

Logan676 commented 9 years ago

I need to custom the color of title and divider of an Alertdialog to be orange, which is same with the theme color of my App. Also I have to custom the layout of Alertdialog because I need to add a checkbox to ask user if they want to open some settings, in other words, I need to fetch isChecked() value of the checkbox in order to persist user`s preference settings. I have tried many times to custom such an Alertdialog with no lucky.

But things didn't go as expected, the value of isChecked() always is false, even when it got checked. So I wonder if I could implement this function via this library. Any advice?

davidvavra commented 9 years ago

Yes have a look JayneHatDialogFragment.java in demo app how to implement dialog with custom view.