I have simple activity and fragment transaction. What i noticed that on configuration changes oncreateView of Fragment is called twice. Why is this happening?

Activity Code Here :

```
    @Override
protected void onCreate(Bundle savedInstanceState) {
    System.out.println("Activity created");

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    FragmentManager manager = getSupportFragmentManager();

    BlankFragment fragment = new BlankFragment();

    addFragmentToActivity(manager,
            fragment,
            R.id.root_activity_create
    );
}

public static void addFragmentToActivity (FragmentManager fragmentManager,
                                          Fragment fragment,
                                          int frameId)
                                           {

    FragmentTransaction transaction = fragmentManager.beginTransaction();
    transaction.replace(frameId, fragment);
    transaction.commit();
    }

```

Fragment Code Here :

```
public class BlankFragment extends Fragment {

public BlankFragment() {
    // Required empty public constructor
}

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {      
    // Inflate the layout for this fragment
    return inflater.inflate(R.layout.fragment_blank, container, false);
}

}

```