8

Android StrictMode InstanceCountViolation when change orienation

view full story
linux-howto

http://stackoverflow.com – I have an activity with tabs and I have problem when I rotate the device. When I start e.g. the app in portrait mode then rotate to the landscape and again to the portrait then the app is crashed and in LogCat I see android.os.StrictMode$InstanceCountViolation: class com.example.MyActivity; instances=2; limit=1 this is my activity onCreate method: mTabManager = new TabManager(this, mTabHost, R.id.realtabcontent, R.id.realtabcontentleft); mTabManager.addTab(mTabHost.newTabSpec(TAB1_ID).setIndicator(indicator1), Fragment.class, args, SendType.SEND1); mTabManager.addTab(mTabHost.newTabSpec(TAB2 (HowTos)