Back to project page CameraDemo.
The source code is released under:
Apache License
If you think the Android project CameraDemo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.binary.one.camera.demo; /*from w w w . j a va 2s. c om*/ import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; public class MainActivity extends FragmentActivity { private Fragment mGameFragment = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); switchToFragment(); } private void switchToFragment() { if (mGameFragment == null) { mGameFragment = GameFragment.newInstance(); } getSupportFragmentManager() .beginTransaction() .replace(R.id.main_content_frame, mGameFragment) .commit(); } }