Fixed dialogue fragment refactor.

We now don't keep a reference to the activity through a view instance.