feat:refact View Dirty Props,prepare to use in ListView

This commit is contained in:
pengfei.zhou
2019-11-12 17:59:38 +08:00
parent dab3c00b4c
commit eea7eb5d27
4 changed files with 30 additions and 4 deletions

View File

@@ -13,7 +13,9 @@ class CounterView extends ViewHolder<CountModel> {
text({
textSize: 40,
layoutConfig: {
alignment: new Gravity().center()
alignment: new Gravity().center(),
widthSpec: LayoutSpec.WRAP_CONTENT,
heightSpec: LayoutSpec.WRAP_CONTENT,
},
}).also(it => { this.number = it }),
text({
@@ -25,7 +27,9 @@ class CounterView extends ViewHolder<CountModel> {
},
corners: 5,
layoutConfig: {
alignment: new Gravity().center()
alignment: new Gravity().center(),
widthSpec: LayoutSpec.WRAP_CONTENT,
heightSpec: LayoutSpec.WRAP_CONTENT,
},
shadow: {
color: Color.parse("#00ff00"),