안녕하세요.

이번에 안드로이드를 막 시작한 초짜입니당..

 

다름이 아니라

 

암시적 인텐드에대해 질문좀 드릴게요

 

public void mOnClick(View v){
  EditText count = (EditText)findViewById(R.id.count);
  
  switch(v.getId()){
  case R.id.img:
   Intent intent = new Intent(Intent.ACTION_VIEW);
   intent.setType("image/*");
   startActivity(intent);
   break;
  

case R.id.order:
   Intent intent_result = new Intent(Order_3.this, Result_4.class);
   intent_result.putExtra("이름", susi_name);
   intent_result.putExtra("수량", count.getText().toString());
   startActivity(intent_result);
   break;
  }
 }

 

R.id.img는 이미지 버튼을 연결 하였습니다.

 

목적은

이미지 버튼을 통해 버튼을 구연했는데..

이미지 버튼을 누를시  해당 이미지를 imageView에서 볼수 있게하는

암시적 intent를 구현하는겁니다.

 

그런데 위에로 실행하면 imageView까지는 실행이 되지만

The application Camera(porcess com.android.gallery)

has stopped unexpectedly. please try again이란 메세지가 뜹니다.

 

intent.setType("image/*");

intent.setDataAndType(null,"image/*");로 바꿔야하는거 같은데..

null을 어떻게 바꿔야할지 모르겠네요

책에는 sd카드에 있는  image를 부르는거였는데

제가 원하는건 sd카드에 있는 image가 아니라 이미지버튼에 있는

image를 보는거라서요... 도와주세요 ㅎ