My tabbed application does not display a view with a change in orientation.
I added
android:configChanges="keyboardHidden|orientation"
to the main activity of the tab and to each activity in the manifest.
I added this method to each view:
public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); setContentView(R.layout.active_alt); mColorLegendBtn = (Button) findViewById(R.id.colorbtn); mStatusView = (TextView) findViewById(R.id.celltitle1); TextView mStatusView1 = (TextView) findViewById(R.id.celltitle2); mStatusView1.setText(mStatusView1.getText()+"testcase1"); mStatusView.setText(mStatusView.getText()+"testcase"); initUI(); } public void initUI() { l1 = (ListView) findViewById(R.id.ListView01); EfficientAdapter efficientAdapter = new EfficientAdapter(mContext); l1.setAdapter(null); l1.setAdapter(efficientAdapter); }
When launched, tabs, list, button and text view are displayed. When I change the orientation in the emulator, only the tabs are displayed by none of the other widgets, the screen is black.
What am I missing?
source share