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.
I needed to use different layouts with same Id. So, the work around is
@Override
protected void onRestoreInstanceState(Bundle savedInstanceState) {
try {
super.onRestoreInstanceState(savedInstanceState);
} catch (Exception ignored) {
}
}
This will save your application from crashing.
super.onRestoreInstanceState(savedInstanceState) may be executed only till the point exception occurs. However, I don't find it useful, at least in my apps, so I can afford to bypass onRestoreInstanceState.