we have to replace the AbsoluteLayout with ViewGroup.Layout before setting it to the dialog as dialog's FrameLayout doesn't accept AbsoluteLayout. This should fix the crash when changing orientation.
ed2a70d6