android - illegalstateexception did not create a view when screen orientation changes -
i have been trying make app opens listview fragment (gradelistfragment) activity (gradelistactivity). when click item, opens new fragment (gradedetailfragment). if in portrait mode, replaces list fragment in fragment1. if in landscape, replaces empty fragment2. problem app crashes when switch orientation. switching both perspectives gets same error. 04-09 12:10:52.240: e/androidruntime(2221): fatal exception: main 04-09 12:10:52.240: e/androidruntime(2221): process: bcs421.christophergoepfert.hwk.gradeapp.presentation, pid: 2221 04-09 12:10:52.240: e/androidruntime(2221): java.lang.runtimeexception: unable start activity componentinfo{bcs421.christophergoepfert.hwk.gradeapp.presentation/bcs421.christ ophergoepfert.hwk.gradeapp.presentation.gradelistactivity}: android.view.inflateexception: binary xml file line #8: error inflating class fragment 04-09 12:10:52.240: e/androidruntime(2221): @ android.app.activitythread.performlaunchactivity(activitythread.ja...