Replaced deprecated dialogs with dialog fragments