判断图片是否与选择前一致(配合图片选择器使用)

参考: https://blog.csdn.net/qq_30711091/article/details/80750078

  1. 在view中设置tag
  2. 根据iv.tag判断
  3. 在Application中配置ViewTarget.setTagId(R.id.glide_tag)
  4. 在values中添加ids.xml <item name="glide_tag" type="id"/>
  5. 使用Glide加载选择后的图片之后,给该图片设置一个新的tag
  6. 判断图片的tag与在布局中设置的tag是否一致,即可判断图片有没有被替换

猜你喜欢

转载自blog.csdn.net/riqthen/article/details/85061218