Android Open Source - camera Main Activity






From Project

Back to project page camera.

License

The source code is released under:

Apache License

If you think the Android project camera 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 cn.bgxt.mediarecorderdemo;
//ww w .  j a  va2  s .com
import com.marcodinacci.book.acb.VideoActivity;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.app.Activity;
import android.content.Intent;

public class MainActivity extends Activity implements OnClickListener {
  private Button btn_record, btn_video;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    btn_record = (Button) findViewById(R.id.btn_record);
    btn_video = (Button) findViewById(R.id.btn_video);

    btn_record.setOnClickListener(this);
    btn_video.setOnClickListener(this);
  }

  @Override
  public void onClick(View v) {
    Intent intent;
    switch (v.getId()) {
    case R.id.btn_record:
      intent = new Intent(MainActivity.this, RecordActivity.class);
      startActivity(intent);
      break;
    case R.id.btn_video:
      intent = new Intent(MainActivity.this, VideoActivity.class);
      startActivity(intent);
      break;
    default:
      break;
    }

  }

}




Java Source Code List

cn.bgxt.mediarecorderdemo.MainActivity.java
cn.bgxt.mediarecorderdemo.RecordActivity.java
com.example.android.photobyintent.AlbumStorageDirFactory.java
com.example.android.photobyintent.BaseAlbumDirFactory.java
com.example.android.photobyintent.FroyoAlbumDirFactory.java
com.example.android.photobyintent.PhotoIntentActivity.java
com.marcodinacci.book.acb.VideoActivity.java
org.yanzi.activity.CameraActivity.java
org.yanzi.camera.CameraInterface.java
org.yanzi.camera.preview.CameraTextureView.java
org.yanzi.util.CamParaUtil.java
org.yanzi.util.DisplayUtil.java
org.yanzi.util.FileUtil.java
org.yanzi.util.ImageUtil.java