@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_camera); if (null == savedInstanceState) { getFragmentManager() .beginTransaction() .replace(R.id.container, Camera2BasicFragment.newInstance()) .commit(); } }
@Override public void onCreate(Bundle b) { super.onCreate(b); setContentView(R.layout.take_picture_layout); // invoke Camera2BasicFragment getFragmentManager() .beginTransaction() .replace(R.id.cameraFragment, Camera2BasicFragment.newInstance()) .commit(); }