mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Change image.android to use the new image.Cache class from widgets. (#2832)
* Change image.android to use the new image.Cahce class from widgets. * fix npm scripts * npm tsc will compile all so no need for npm run dev-tsc-tests * fix tslint error * image-tests use memory only cache. * fix exception in image.android * Change image-tests so that Image won't be GC immediately. * Change cacheMode to enum
This commit is contained in:
@@ -53,54 +53,4 @@ declare module android {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
declare module org {
|
||||
export module nativescript {
|
||||
export module widgets {
|
||||
export module Async {
|
||||
export class CompleteCallback {
|
||||
constructor(implementation: ICompleteCallback);
|
||||
onComplete(result: Object, context: Object): void;
|
||||
}
|
||||
|
||||
export interface ICompleteCallback {
|
||||
onComplete(result: Object, context: Object): void;
|
||||
}
|
||||
|
||||
export module Image {
|
||||
export function download(url: string, callback: CompleteCallback, context: any);
|
||||
}
|
||||
|
||||
export module Http {
|
||||
export class KeyValuePair {
|
||||
public key: string;
|
||||
public value: string;
|
||||
constructor(key: string, value: string);
|
||||
}
|
||||
|
||||
export class RequestOptions {
|
||||
public url: string;
|
||||
public method: string;
|
||||
public headers: java.util.ArrayList<KeyValuePair>;
|
||||
public content: string;
|
||||
public timeout: number;
|
||||
public screenWidth: number;
|
||||
public screenHeight: number;
|
||||
}
|
||||
|
||||
export class RequestResult {
|
||||
public raw: java.io.ByteArrayOutputStream;
|
||||
public headers: java.util.ArrayList<KeyValuePair>;
|
||||
public statusCode: number;
|
||||
public responseAsString: string;
|
||||
public responseAsImage: android.graphics.Bitmap;
|
||||
public error: java.lang.Exception;
|
||||
}
|
||||
|
||||
export function MakeRequest(options: RequestOptions, callback: CompleteCallback, context: any);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user