类: Widget
更新: 2025/10/24 字数: 0 字 时长: 0 分钟
ui/view.Widget
- created
- render
- rootViewCreated: root view created but children are not inflated
- inflated: children inflated and internal and initial attributes are applied, but external attributes are not applied
- mounted: external attributes applied
目录
Constructors
属性
Accessors
方法
Constructors
constructor
- new Widget()
属性
attrs
- attrs:
WidgetAttributes={}
Accessors
initialAttributes
getinitialAttributes():WidgetAttributes
返回值
view
getview():any
返回值
any
方法
created
- created():
void
返回值
void
getAttribute
- getAttribute(
name,def):AttributeValue
参数
| 名称 | 类型 |
|---|---|
name | string |
def | () => AttributeValue |
返回值
hasAttribute
- hasAttribute(
name):boolean
参数
| 名称 | 类型 |
|---|---|
name | string |
返回值
boolean
inflated
- inflated():
void
返回值
void
mounted
- mounted():
void
返回值
void
render
Abstractrender(context,parent):any
参数
| 名称 | 类型 |
|---|---|
context | Context |
parent | ViewGroup |
返回值
any
rootViewCreated
- rootViewCreated(
view):void
参数
| 名称 | 类型 |
|---|---|
view | any |
返回值
void
setAttribute
- setAttribute(
name,value,def):void
参数
| 名称 | 类型 |
|---|---|
name | string |
value | AttributeValue |
def | (value: AttributeValue) => void |
返回值
void
create
Staticcreate(name):undefined|Widget
参数
| 名称 | 类型 |
|---|---|
name | string |
返回值
undefined | Widget
of
Staticof<W>(view):undefined|W
类型参数
| 名称 | 类型 |
|---|---|
W | extends Widget<W> |
参数
| 名称 | 类型 |
|---|---|
view | View |
返回值
undefined | W
register
Staticregister(name,widget):void
参数
| 名称 | 类型 |
|---|---|
name | string |
widget | WidgetClass |
返回值
void
