Glide로 웹에서 이미지를 받아온 이미지를 동적으로 생성시킨 이미지뷰에 넣고 싶습니다.
하지만 동적으로 생성한 이미지뷰에 넣는 방법을 모르겠습니다.
일단 tag를 붙여서 해볼까 했는데 이것도 안되더라고요 이거 어떻게 해주어야 하는건가요??
도와주세요.
ImageView imgV = new ImageView(getContext());
imgV.setTag("img"+id);
imgV.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
scrolllayout.addView(imgV);
ImageView img1 = (ImageView) scrolllayout.findViewWithTag("img"+id);
String imageUrl = "http://tjdskaehd347.dothome.co.kr/";
System.out.println(imageUrl+"tjdpost"+fullUploadtime+"/0.jpg"+"번");
Glide.with(getContext()).load(imageUrl+userid+"post"+fullUploadtime+"/0.jpg").into(img1);
id+=1;