Refactor edit to use DialogFragment instead of a second activity.