336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
카메라 인텐트로 띄운후 해당 이미지 ImageView에 띄우기
1. 카메라 인텐트 띄우기
Intent intent = new Intent(); intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent, 1);
2. 갤러리 인텐트 띄우기
Intent intent = new Intent();
intent.setAction(Intent.ACTION_GET_CONTENT);
intent.setType("image/*");
startActivityForResult(intent, 2);
인텐트 후 Image 불러오기
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if (resultCode == RESULT_OK)
{
if (requestCode == 1) // 1 은 위에서 startActivityForResult(intent, 1);
{
ImageView imageView1 = (ImageView)findViewById(R.id.imageView1);
Bitmap bm = (Bitmap) data.getExtras().get("data");
imageView1.setImageBitmap(bm);
}
}
}
'Programming > Android' 카테고리의 다른 글
| Android SQLite Select Where And & (0) | 2013.05.17 |
|---|---|
| 안드로이드 BItmap ImageView Drawable (0) | 2013.05.16 |
| Intent 정리 (0) | 2013.05.09 |
| 파일 이름 일괄 변경 DarkNamer (0) | 2013.05.05 |
| MyLocation Class (0) | 2013.05.04 |

