When trying to load an image using Glide
, inside an ImageView, ensuring to have the path of the image in urlImage
and the instance of the ImageView
in imgZoom
, this is my code:
private View individual(LayoutInflater inflater, ViewGroup container) {
View v = inflater.inflate(R.layout.fragment_image_zoom, container, false);
final View pbr = v.findViewById(R.id.PhotoDetail_pbr_main);
imgZoom = (ZoomImageView) v.findViewById(R.id.PhotoDetail_tiv_main);
imgZoom.setTag(urlImage);
imgZoom.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
View layTextPie = getActivity().findViewById(R.id.textViewFooter);
}
});
Glide.with(inflater.getContext())
.load(urlImage)
.into(imgZoom);
}
return v;
}
I get the following error message:
java.lang.IllegalArgumentException: You must not call setTag () on a view Glide is targeting