I have a DB that stores the paths of the photo. In my application I show this photo with Glide library.
The paths are:
http://www.mysite.example/username/0.jpg
http://www.mysite.example/username/1.jpg
But I have a problem when I delete the row on the DB table, the path of the photo restarts from 0
and when I show the photos with Glide, it shows me the photo that was stored before.
How do I fix this problem? Clear cache?
This is a snippet of the code
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View v = convertView;
ImageView imageView;
if (v == null) {
v = inflater.inflate(R.layout.gridview_item, parent, false);
v.setTag(R.id.picture, v.findViewById(R.id.picture));
}
imageView = (ImageView) v.getTag(R.id.picture);
Glide.with(context).load(path.get(position).getPath()).into(imageView);
return v;
}