Add resource system for doric,start with android

This commit is contained in:
pengfei.zhou
2021-10-20 18:57:17 +08:00
committed by osborn
parent 7637a820e5
commit 5501dd38d9
26 changed files with 880 additions and 23 deletions

View File

@@ -1,12 +1,17 @@
import { View } from "../ui/view";
import { Color } from "../util/color";
import { BridgeContext } from "../runtime/global";
import { Resource } from "../util/resource";
export declare enum ScaleType {
ScaleToFill = 0,
ScaleAspectFit = 1,
ScaleAspectFill = 2
}
export declare class Image extends View {
/**
* This could be loaded by customized resource loader
*/
image?: Resource;
imageUrl?: string;
/**
* Read image from local file system.

View File

@@ -25,6 +25,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
import { View, Property } from "../ui/view";
import { layoutConfig } from "../util/layoutconfig";
import { Color } from "../util/color";
import { Resource } from "../util/resource";
export var ScaleType;
(function (ScaleType) {
ScaleType[ScaleType["ScaleToFill"] = 0] = "ScaleToFill";
@@ -42,6 +43,10 @@ export class Image extends View {
return this.nativeChannel(context, "stopAnimating")();
}
}
__decorate([
Property,
__metadata("design:type", Resource)
], Image.prototype, "image", void 0);
__decorate([
Property,
__metadata("design:type", String)