android-FlipView icon indicating copy to clipboard operation
android-FlipView copied to clipboard

Refresh FlipView to update screen

Open kaciula opened this issue 10 years ago • 2 comments

In my adapter I fetch images from the Internet via the Picasso library and I use a placeholder image while the download is in progress. In some cases, the placeholder image is overlayed on top of the downloaded image. If I touch the image and start a flip, the overlay disappears and everything is OK.

Is there a way to refresh the FlipView when the image has been downloaded in order to update the screen?

kaciula avatar Oct 31 '13 13:10 kaciula

i am surprised that you are seeing this behaviour. I have myself used picasso with this library and it works just fine.

emilsjolander avatar Oct 31 '13 14:10 emilsjolander

My setup is very simple. I have a FlipView in a layout and set a simple adapter which has the following getView() method:

@Override public View getView(int position, View convertView, ViewGroup parent) { final ImageView screenShot; if (convertView == null) screenShot = (ImageView) mInflater.inflate(R.layout.widget_screenshot, parent, false); else screenShot = (ImageView) convertView;

    screenShot.setOnClickListener(this);

    String url = ((ScreenShotResponse) getItem(position)).url;
    if (!MiscUtils.isValidUrl(url))
        screenShot.setImageResource(R.drawable.loading_error);
    else
        NetService.getPicasso().load(url).placeholder(R.drawable.loading).error(R.drawable
                .loading_error).into(screenShot);
    return screenShot;
}

One thing I noticed is that on Android 2.3 this does not happen. On Android 4.3 and 4.1 it happens.

kaciula avatar Oct 31 '13 14:10 kaciula