Why DialogFragment can't be an inner class?

Viewed 4510

If I had my DialogFragment declared as an inner class I got an InstantiationException on orientation change, i.e. when instance is recreated, which says there is no public constructor, class isn't public etc. In fact everything is public, default constructor is in place. If I just move this DialogFragment to a separate file - everything goes fine. I'm not looking for a workaround, I just want to understand why this is happening.

1 Answers
Related