nativescript-fresco icon indicating copy to clipboard operation
nativescript-fresco copied to clipboard

[Feature Request] Support Requesting Multiple Images (Multi-URI)

Open vahidvdn opened this issue 6 years ago • 7 comments

Is there any way to have Multiple Images (Multi-URI)? As native plugin supports it.

I want to first load a smaller image , then show a high resolution image. Any idea?

vahidvdn avatar Feb 12 '19 17:02 vahidvdn

I could be able to handle this by finalImageSet event. First I make a small image visible, and after the main image has been downloaded, I make the main image visible. But in list view, only 4 first items work fine. (Items are in viewport). This relates to RadListView virtualization. I don't know why this happen.

Here is my code:

<StackLayout [visibility]="item.isLoadingThumb ? 'visible' : 'collapse'">
    <FrescoDrawee verticalAlignment="center" aspectRatio="1"
        fadeDuration="1" blurRadius="3" autoPlayAnimations="false"
        [imageUri]="'http://domain.com/'+item.post_picture_thumb"></FrescoDrawee>
</StackLayout>

<StackLayout [visibility]="item.isLoadingMain ? 'visible' : 'collapse'">
    <FrescoDrawee verticalAlignment="center" aspectRatio="1"
        fadeDuration="1" (finalImageSet)="onFinalImageSet($event, i)"
        autoPlayAnimations="false" [imageUri]="'http://domain/'+item.post_picture"></FrescoDrawee>
</StackLayout>

And TS:

onFinalImageSet(args: FinalEventData, count) {
  console.log(count);  // Only print up to 4
  this.items[count].isLoadingThumb = false;
  this.items[count].isLoadingMain  = true;
}

vahidvdn avatar Feb 13 '19 10:02 vahidvdn

That is very strange that works fine with ListView instead of RadListView.

vahidvdn avatar Feb 13 '19 11:02 vahidvdn

Hi @vahidvdn,

As discussed in this thread https://github.com/NativeScript/nativescript-fresco/issues/50 we will be deprecating the fresco plugin and redirect users to the nativescript-image plugin, which can be used in both Android and iOS. There is still some polishing work to be done before we finalize the process, but we will not be including new functionalities in the fresco plugin.

elena-p avatar Feb 27 '19 12:02 elena-p

Hi @elena-p

Thanks for your reply. So, waiting for upcoming news for the new plugin. Cheers.

vahidvdn avatar Feb 27 '19 14:02 vahidvdn

@elena-p Do you have plan to expand nativescript-image-cache-it plugin? It's not really stable and has some issues like mentioned here.

vahidvdn avatar Feb 27 '19 14:02 vahidvdn

Hi @vahidvdn, the nativescript-image-cache-it plugin is not maintained by the NativeScript team and I cannot provide you with details for future versions and improvements.

elena-p avatar Feb 28 '19 07:02 elena-p

Hi @elena-p Sorry, I considered nativescript-image plugin will be a fork of nativescript-image-cache-it plugin.

vahidvdn avatar Feb 28 '19 08:02 vahidvdn