Android Open Source - CameraDemo Main Activity






From Project

Back to project page CameraDemo.

License

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.

Java Source Code

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();
    }
}




Java Source Code List

com.binary.one.camera.demo.Camera.java
com.binary.one.camera.demo.GameFragment.java
com.binary.one.camera.demo.GameLogic.java
com.binary.one.camera.demo.MainActivity.java
com.binary.one.camera.demo.World.java