안드로이드 개발 질문/답변
(글 수 45,052)
갤러리뷰에서 클릭한 이미지를 다음 액티비티의 배경으로 깔려고 합니다
public void onItemClick(AdapterView parent, View v, int position, long id) {
Intent intent = new Intent(A.this, B.class);
intent.putExtra("picture", position);
startActivity(intent);
보내는 쪽을 이런식으로 썼는데 받는쪽을 어떻게 써야할지 모르겠습니다 도와주세용 ㅜ
저 포지션 값을 받아서 그걸 뿌려야 되는데 감이 잡히질않네요 ㅜ
intent.putExtra("picture", 이미지[position]);
받는 쪽은
Intent i = getIntent();
Bundle extras = i.getExtras();
String 이미지위치= extras.getString("picture");