AndroidImageSlider icon indicating copy to clipboard operation
AndroidImageSlider copied to clipboard

needs to reload SliderView's image

Open sc0ttie opened this issue 10 years ago • 1 comments

My app downloads images from internet and saves them into SD card. However, images need to be shown when they are not downloaded. I set the DefaultSliderView as below:

SliderLayout imgSlider = (SliderLayout) findViewById(R.id.image_slider);

for (String imgPath : sdPaths) {
    File imgFile = new File(imgPath);
    Bundle bundle = new Bundle();
    bundle.putString("extra", imgPath);

    DefaultSliderView view = new DefaultSliderView(this);

    view.setScaleType(BaseSliderView.ScaleType.Fit)
        .setOnSliderClickListener(this)
        .bundle(bundle);

    view.image(imgFile);
    view.empty(R.drawable.refresh);

    imgSlider.addSlider(view);
}

Here goes the problem: When current view's image is downloaded, I cannot update the view immediately. I have to removeAllSliders and add them back so it can be shown. Or user swipes to next image then swipe back. Is there any way to reload the image in DefaultSliderView?

sc0ttie avatar Jul 31 '15 03:07 sc0ttie

Hello,

I used this method before calling the service again.

imageSlider.removeAllSliders();

That's the way you can try.

halilozel1903 avatar Sep 25 '19 14:09 halilozel1903