When the screen orientation in the app changes, the app freezes. There are xml files for both portrait and landscape mode. So the UI adjusts when orientation changes but the app freezes.
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
setContentView(R.layout.main);
By freezes if you mean listner and other handler not working , this is because after setContentView(R.layout.main) you have rto einitialize views like