Fixed Activity Illegal State bug, caused by launching dialog from adapter rather than an activity.