I\'ve had my application out in the store for a while, but it seems it crashes occasionally according to the crash reports in the Developer Console, saying:
java.lang.
In my case my portrait xml has Relativelayout and ScrollView from landscape xml with the same ID.
On my activity class I try to inflate the layout and assign it on ViewGroup
So when screen rotation occur it throws:
java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.widget.ScrollView$SavedState
It's because the ScrollView extends FrameLayout while Relativelayout extends ViewGroup
So i just wrap the landscape xml with Relativelayout and solves the problem