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

@@ -17,6 +17,7 @@ import { View, Property } from "../ui/view"
import { layoutConfig } from "../util/layoutconfig"
import { Color } from "../util/color"
import { BridgeContext } from "../runtime/global"
import { Resource } from "../util/resource"
export enum ScaleType {
ScaleToFill = 0,
@@ -25,9 +26,14 @@ export enum ScaleType {
}
export class Image extends View {
/**
* This could be loaded by customized resource loader
*/
@Property
image?: Resource
@Property
imageUrl?: string
/**
* Read image from local file system.
*/