UNPKG

@nativescript-community/ui-image

Version:

Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.

84 lines (83 loc) 3.31 kB
export * from './index-common'; import { AnimatedImage, EventData, ImageBase, ImageError as ImageErrorBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting, SrcType } from './index-common'; export declare function initialize(config?: ImagePipelineConfigSetting): void; export declare function getImagePipeline(): ImagePipeline; export declare function shutDown(): void; export declare class ImagePipeline { private _android; toUri(value: string | android.net.Uri): globalAndroid.net.Uri; getCacheKey(uri: string, context: any): string; isInDiskCache(uri: string | android.net.Uri): boolean; isInBitmapMemoryCache(uri: string | android.net.Uri): boolean; evictFromMemoryCache(uri: string | android.net.Uri): void; evictFromDiskCache(uri: string | android.net.Uri): Promise<void>; evictFromCache(uri: string | android.net.Uri): Promise<void>; clearCaches(): void; clearMemoryCaches(): void; clearDiskCaches(): void; prefetchToDiskCache(uri: string): Promise<void>; prefetchToMemoryCache(uri: string): Promise<void>; private prefetchToCache; get android(): any; set android(value: any); fetchImage(): void; } export declare class ImageError implements ImageErrorBase { private _stringValue; private _message; private _errorType; constructor(throwable: java.lang.Throwable); getMessage(): string; getErrorType(): string; toString(): string; } export interface QualityInfo { getQuality(): any; isOfFullQuality(): any; isOfGoodEnoughQuality(): any; } export declare class ImageInfo implements ImageInfoBase { private _nativeImageInfo; constructor(imageInfo: any); getHeight(): number; getWidth(): number; getQualityInfo(): QualityInfo; } export declare class FinalEventData extends EventData { private _imageInfo; private _animatable; get imageInfo(): ImageInfo; set imageInfo(value: ImageInfo); get animatable(): AnimatedImage; set animatable(value: AnimatedImage); get android(): AnimatedImage; } export declare class IntermediateEventData extends EventData { private _imageInfo; get imageInfo(): ImageInfo; set imageInfo(value: ImageInfo); } export declare const needUpdateHierarchy: (targetOrNeedsLayout: any, propertyKey?: string | Symbol, descriptor?: PropertyDescriptor) => any; export declare class Img extends ImageBase { nativeViewProtected: com.nativescript.image.DraweeView; nativeImageViewProtected: com.nativescript.image.DraweeView; isLoading: boolean; mCanUpdateHierarchy: boolean; mNeedUpdateHierarchy: boolean; mNeedUpdateLayout: boolean; onResumeNativeUpdates(): void; createNativeView(): com.nativescript.image.DraweeView; updateViewSize(imageInfo: any): void; disposeNativeView(): void; get cacheKey(): string | globalAndroid.net.Uri; updateImageUri(): Promise<void>; controllerListener: com.facebook.drawee.controller.ControllerListener<com.facebook.imagepipeline.image.ImageInfo>; protected handleImageSrc(src: SrcType): Promise<void>; protected initImage(): Promise<void>; private updateHierarchy; private getDrawable; private getDrawableFromLocalFile; private getDrawableFromResource; startAnimating(): void; stopAnimating(): void; }