0

Using droid-fu, how can I make a WebImageView re-download the picture and display it? Think of a webcam refreshing every 5 minutes...

I tried a button calling a method like:

public void refresh() {
    webcam1.reset();
    webcam1.setImageUrl(webcam1url);
    webcam1.loadImage();
}

where webcam1 is my WebImageView, but the it never reloads, I just have the loading wheel forever in place of the new image.

Antonio Giungato
  • 145
  • 1
  • 2
  • 10

1 Answers1

0

The solution was to implement clearCache() method in WebImageView and refresh the whole activity:

public void refreshImages() {
    webcam1.clearCache();
    startActivity(getIntent());
    finish();
    overridePendingTransition(0, 0);
}
Antonio Giungato
  • 145
  • 1
  • 2
  • 10