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

instantiate the dialog many times. #38

Closed jiqimaogou closed 10 years ago

jiqimaogou commented 10 years ago

everytime i want to show the dialog, it will create an instance every time, is it waste of memory. I just want to create a dialog one time, and call the show method and hide method. is it possible?

davidvavra commented 10 years ago

Hi, this is not an issue, creating dialog everytime doesn't have noticable memory and performance overhead. It's safe to do it everytime. If you need to hold some custom data in memory in your child dialog, you can do that using static references.