fix(android): image asset handling regarding requestLegacyExternalStorage (#9373)

This commit is contained in:
Osei Fortune
2021-05-09 22:29:44 -04:00
committed by GitHub
parent 879b5f6a22
commit f311151496
8 changed files with 380 additions and 97 deletions

View File

@ -1,11 +1,6 @@
declare module org {
module nativescript {
module widgets {
export class Utils {
public static drawBoxShadow(view: android.view.View, value: string): void;
}
export class BoxShadowDrawable {
public constructor(drawable: android.graphics.drawable.Drawable, value: string);
public getWrappedDrawable(): android.graphics.drawable.Drawable;
@ -632,3 +627,34 @@
}
}
}
declare module org {
export module nativescript {
export module widgets {
export class Utils {
public static class: java.lang.Class<org.nativescript.widgets.Utils>;
public static loadImageAsync(param0: globalAndroid.content.Context, param1: string, param2: string, param3: number, param4: number, param5: org.nativescript.widgets.Utils.AsyncImageCallback): void;
public static drawBoxShadow(param0: globalAndroid.view.View, param1: string): void;
public constructor();
}
export module Utils {
export class AsyncImageCallback {
public static class: java.lang.Class<org.nativescript.widgets.Utils.AsyncImageCallback>;
/**
* Constructs a new instance of the org.nativescript.widgets.Utils$AsyncImageCallback interface with the provided implementation. An empty constructor exists calling super() when extending the interface class.
*/
public constructor(implementation: {
onSuccess(param0: globalAndroid.graphics.Bitmap): void;
onError(param0: java.lang.Exception): void;
});
public constructor();
public onSuccess(param0: globalAndroid.graphics.Bitmap): void;
public onError(param0: java.lang.Exception): void;
}
export class ImageAssetOptions {
public static class: java.lang.Class<org.nativescript.widgets.Utils.ImageAssetOptions>;
}
}
}
}
}