• 大小: 0.54M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-02-01
  • 语言: Java
  • 标签: 实例  

资源简介

Camera预览实例代码

资源截图

代码片段和文件信息

package net.pikanji.camerapreviewsample;

import java.io.IOException;
import java.util.List;

import android.app.Activity;
import android.content.res.Configuration;
import android.hardware.Camera;
import android.hardware.Camera.PreviewCallback;
import android.os.Build;
import android.util.Log;
import android.view.Display;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.widget.RelativeLayout;
import android.widget.Toast;

/**
 * This class assumes the parent layout is RelativeLayout.LayoutParams.
 */
public class CameraPreview extends SurfaceView implements SurfaceHolder.Callback {
    private static boolean DEBUGGING = true;
    private static final String LOG_TAG = “CameraPreviewSample“;
    private static final String CAMERA

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\
     文件         273  2011-09-26 08:48  CameraPreviewSample-master\.classpath
     文件          24  2011-09-26 08:48  CameraPreviewSample-master\.gitignore
     文件         822  2011-09-26 08:48  CameraPreviewSample-master\.project
     文件         957  2011-09-26 08:48  CameraPreviewSample-master\AndroidManifest.xml
     文件        5033  2011-09-26 08:48  CameraPreviewSample-master\README.md
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\assets\
     文件       97433  2011-09-26 08:48  CameraPreviewSample-master\assets\CameraPreviewSample_512x512icon.png
     文件      282675  2011-09-26 08:48  CameraPreviewSample-master\assets\CameraPreviewSample_512x512icon.xcf
     文件       21941  2011-09-26 08:48  CameraPreviewSample-master\assets\CameraPreviewSample_ss1.png
     文件      330242  2011-09-26 08:48  CameraPreviewSample-master\assets\CameraPreviewSample_ss2.png
     文件         363  2011-09-26 08:48  CameraPreviewSample-master\default.properties
     文件        1159  2011-09-26 08:48  CameraPreviewSample-master\proguard.cfg
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\res\
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\res\drawable-hdpi\
     文件        4147  2011-09-26 08:48  CameraPreviewSample-master\res\drawable-hdpi\icon.png
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\res\drawable-ldpi\
     文件        1723  2011-09-26 08:48  CameraPreviewSample-master\res\drawable-ldpi\icon.png
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\res\drawable-mdpi\
     文件        2574  2011-09-26 08:48  CameraPreviewSample-master\res\drawable-mdpi\icon.png
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\res\layout\
     文件        1127  2011-09-26 08:48  CameraPreviewSample-master\res\layout\main.xml
     文件         646  2011-09-26 08:48  CameraPreviewSample-master\res\layout\test.xml
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\res\values\
     文件         121  2011-09-26 08:48  CameraPreviewSample-master\res\values\strings.xml
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\src\
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\src\net\
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\src\net\pikanji\
     目录           0  2011-09-26 08:48  CameraPreviewSample-master\src\net\pikanji\camerapreviewsample\
     文件       13897  2011-09-26 08:48  CameraPreviewSample-master\src\net\pikanji\camerapreviewsample\CameraPreview.java
     文件        1772  2011-09-26 08:48  CameraPreviewSample-master\src\net\pikanji\camerapreviewsample\CameraPreviewSampleActivity.java
............此处省略3个文件信息

评论

共有 条评论