Here I wrote an simple activity and fragment. I changed orientation and since it's configuration change call so it called Activity.onCreate() again but why Fragment.onCreateView() again. Since I am not calling fragment child on configuration change call.
Here is my code :
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.home_container);
log("life_cycle_activity", "onCreate");
if(savedInstanceState != null) {
log("life_cycle_activity", "ohh..configuration changed");
return;
} else {
launchChildFragment();
}
}
NOTE: android:configChanges not work on Settings->Display->FontStyle change
Any suggestion how can prevent Fragment call on configuration change.