UNPKG

@nativescript-community/ui-image

Version:

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

78 lines (77 loc) 2.89 kB
export * from './index-common'; import { ImageBase, ImageError as ImageErrorBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting, SrcType } from './index-common'; export declare function initialize(config?: ImagePipelineConfigSetting): void; export declare class ImagePipeline { toUri(value: string | android.net.Uri): string; getCacheKey(uri: string, context: any): string; isInDiskCache(uri: string | android.net.Uri): Promise<boolean>; isInBitmapMemoryCache(uri: string | android.net.Uri): boolean; evictFromMemoryCache(uri: string | android.net.Uri): Promise<void>; evictFromDiskCache(uri: string | android.net.Uri): Promise<void>; evictFromCache(uri: string | android.net.Uri): Promise<void>; clearCaches(): Promise<void>; clearMemoryCaches(): Promise<void>; clearDiskCaches(): Promise<void>; prefetchToDiskCache(uri: string): Promise<void>; prefetchToMemoryCache(uri: string): Promise<void>; private prefetchToCache; get android(): any; } export declare function getImagePipeline(): ImagePipeline; export declare function shutDown(): 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 _width; private _height; constructor(width: number, height: number); getHeight(): number; getWidth(): number; getQualityInfo(): QualityInfo; } export declare class Img extends ImageBase { [key: symbol]: (...args: any[]) => any | void; preventPreClearDrawable: boolean; nativeViewProtected: com.nativescript.image.MatrixImageView; nativeImageViewProtected: com.nativescript.image.MatrixImageView; mNeedUpdateLayout: boolean; private currentTarget; private isNetworkRequest; private progressCallback; private loadSourceCallback; createNativeView(): com.nativescript.image.MatrixImageView; disposeNativeView(): void; get cacheKey(): string; updateImageUri(): Promise<void>; private cancelCurrentRequest; private loadImageWithGlide; private notifyLoadSource; notifyProgress(payload: { loaded: number; total: number; progress: number; finished: boolean; }): void; private notifyFinalImageSet; private notifyFailure; private getAnimatable; protected handleImageSrc(src: SrcType): Promise<void>; protected initImage(): Promise<void>; private getDrawable; private getDrawableFromLocalFile; private getDrawableFromResource; startAnimating(): void; stopAnimating(): void; }