11 2011 档案
摘要:在main.xml布局文件添加用于显示取景画面的SurfaceView 控件:<SurfaceView android:layout_width="fill_parent" android:layout_height="240dip" android:id="@+id/surfaceView" />SurfaceView surfaceView = (SurfaceView)this.findViewById(R.id.surfaceView);surfaceView.getHolder().setFixedSize(17
阅读全文
摘要:第一步:在功能清单文件AndroidManifest.xml中添加音频刻录和照相机权限:<uses-permission android:name="android.permission.RECORD_AUDIO"/><uses-permission android:name="android.permission.CAMERA"/><uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/><us
阅读全文
摘要:/*用来标识请求照相功能的activity*/ private static final int CAMERA_WITH_DATA = 3023; /*用来标识请求gallery的activity*/ private static final int PHOTO_PICKED_WITH_DATA = 3021; /*拍照的照片存储位置*/ private static final File PHOTO_DIR = new File(Environment.getExternalStorageDirectory() + "/DCIM/Camera"); 注意此处 写的是sd卡
阅读全文