@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.04 kB
TypeScript
export * from './image-common';
import { AnimatedImage, EventData, ImageBase, ImageError as ImageErrorBase, ImageInfo as ImageInfoBase, ImagePipelineConfigSetting } from './image-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;
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): void;
evictFromCache(uri: string | android.net.Uri): 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 class FailureEventData extends EventData {
private _error;
get error(): ImageError;
set error(value: ImageError);
}
export declare const needRequestImage: (target: any, propertyKey: string | Symbol, descriptor: PropertyDescriptor) => void;
export declare class Img extends ImageBase {
nativeViewProtected: com.nativescript.image.DraweeView;
isLoading: boolean;
_canRequestImage: boolean;
_canUpdateHierarchy: boolean;
_needUpdateHierarchy: boolean;
_needRequestImage: boolean;
onResumeNativeUpdates(): void;
createNativeView(): com.nativescript.image.DraweeView;
updateViewSize(imageInfo: any): void;
updateImageUri(): void;
private initImage;
private updateHierarchy;
private getDrawable;
private getDrawableFromLocalFile;
private getDrawableFromResource;
startAnimating(): void;
stopAnimating(): void;
}