android:fix mix use layoutConfig and flexConfig

This commit is contained in:
pengfei.zhou
2020-04-13 14:30:14 +08:00
committed by osborn
parent 5a8a855f89
commit 7a2bffdb64
8 changed files with 205 additions and 116 deletions

View File

@@ -24,21 +24,22 @@ enum ValueType {
export class FlexTypedValue implements Modeling {
type = ValueType.Auto
type: ValueType
value = 0
constructor(type: ValueType) {
this.type = type
}
static Auto = new FlexTypedValue
static Auto = new FlexTypedValue(ValueType.Auto)
static percent(v: number) {
const ret = new FlexTypedValue
ret.type = ValueType.Percent
const ret = new FlexTypedValue(ValueType.Percent)
ret.value = v
return ret
}
static point(v: number) {
const ret = new FlexTypedValue
ret.type = ValueType.Point
const ret = new FlexTypedValue(ValueType.Point)
ret.value = v
return ret
}