본문 바로가기
IT Study/Android

[Android] 이미지 뷰의 이미지를 다른 이미지 뷰로 가져오기

by dev_huhu 2020. 3. 30.
반응형
1
2
3
4
5
6
7
ImageView iv = (ImageView) findViewById(R.id.iv);
ImageView iv2 = (ImageView) view.findViewById(R.id.iv2);
BitmapDrawable bitmapDrawable = (BitmapDrawable) iv.getDrawable();
Bitmap bitmap = bitmapDrawable.getBitmap();
iv2.setImageBitmap(bitmap);
 
 
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs

 

iv에 있는 이미지를 iv2로 가져오기

반응형

댓글