Methods
(async, static) createObj() → {Promise.<TextStyle>}
构造一个新的TextStyle对象,可通过无参或有参构造。
有参构造的参数为:文本颜色(String, eg:'rgba(128, 128, 128, 128)')、文本大小(float类型的Number)
- Source:
Returns:
- Type
- Promise.<TextStyle>
(async, static) getColor() → {String}
获取颜色
- Source:
Returns:
颜色
- Type
- String
(async, static) getSize() → {Number}
获取文本的大小
- Source:
Returns:
文本大小(单位:dp,float类型的Number)
- Type
- Number
(async, static) setColor(color) → {Promise.<Void>}
Parameters:
| Name | Type | Description |
|---|---|---|
color |
String | 颜色 eg:'rgba(128, 128, 128, 128)' |
- Source:
Returns:
- Type
- Promise.<Void>
(async, static) setSize(size) → {Promise.<Void>}
设置文本的大小
Parameters:
| Name | Type | Description |
|---|---|---|
size |
Number | 文本大小(单位:dp,float类型的Number) |
- Source:
Returns:
- Type
- Promise.<Void>