Let's say that onCreate
looks like this
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
initializeElements();
setOnClickListeners();
updateTable();
}
Does onConfigurationChanged
:
onCreate
methods orHere's the other method.
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
setContentView(R.layout.main);
initializeElements();
setOnClickListeners();
updateTable();
}
If the onConfigurationChanged is the same as onCreate, you shouldn't need to have an onConfigurationChanged because android will call onCreate.
OnconfigurationChanged is normally used when you don't want android to restart your app, so you usually just recreate the view and continue running your program.