d
This commit is contained in:
@@ -45,6 +45,7 @@ public class SelectPicDanimicActivity extends Activity implements OnClickListene
|
||||
private int photeid;
|
||||
private boolean crop;//裁剪
|
||||
private int cropx, cropy;//裁剪的高和宽
|
||||
private int entertype=1;//
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
@@ -101,22 +102,23 @@ public class SelectPicDanimicActivity extends Activity implements OnClickListene
|
||||
crop = getIntent().getBooleanExtra("crop", false);
|
||||
cropx = getIntent().getIntExtra("cropx", 1);
|
||||
cropy = getIntent().getIntExtra("cropy", 2);
|
||||
entertype = getIntent().getIntExtra("entertype", 1);
|
||||
fileolod = Environment.getExternalStorageDirectory().getPath() + string + filelodother;
|
||||
break;
|
||||
}
|
||||
|
||||
try {
|
||||
if(entertype==100){
|
||||
try {
|
||||
|
||||
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri
|
||||
.fromFile(new File(fileolod)));
|
||||
startActivityForResult(intent, 1);
|
||||
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri
|
||||
.fromFile(new File(fileolod)));
|
||||
startActivityForResult(intent, 1);
|
||||
|
||||
|
||||
//拍照我们用Action为MediaStore.ACTION_IMAGE_CAPTURE,
|
||||
//有些人使用其他的Action但我发现在有些机子中会出问题,所以优先选择这个
|
||||
//拍照我们用Action为MediaStore.ACTION_IMAGE_CAPTURE,
|
||||
//有些人使用其他的Action但我发现在有些机子中会出问题,所以优先选择这个
|
||||
|
||||
|
||||
/* Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||
@@ -124,10 +126,10 @@ public class SelectPicDanimicActivity extends Activity implements OnClickListene
|
||||
Environment.getExternalStorageDirectory(), "temp.jpg")));
|
||||
System.out.println("=============" + Environment.getExternalStorageDirectory());*/
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user