如果是图片,可否点击后看到图片是哪个url?
bravekingzhang opened this issue · 2 comments
bravekingzhang commented
if (view instanceof ImageView){
Attribute tagPicUrlAttribute = new Attribute("tag-image-url", String.valueOf(view.getTag(R.integer.pic_url_tag)));
attributes.add(tagPicUrlAttribute);
}
@Override
public void onBinding(int position, UniversalAdapter.ViewPool pool, String data) {
ImageView view = pool.getView(R.id.image_view);
view.setTag(R.integer.pic_url_tag, data);
Glide.with(view)
.load(data)
.into(view);
}
bravekingzhang commented
bravekingzhang commented
public class TagParser implements IParser<ImageView> {
@Override
public List<Attribute> getAttrs(ImageView view) {
List<Attribute> attributes = new ArrayList<>();
Attribute tagPicUrlAttribute = new Attribute("tag-image-url", String.valueOf(view.getTag(R.integer.pic_url_tag)));
attributes.add(tagPicUrlAttribute);
return attributes;
}
}
Pandora.get().getAttrFactory().addParser(new TagParser());