UiSelector 类
节点选择器,通过设置节点的属性来选择节点
方法
checkable
设置目标节点是否可选中
参数
- is : boolean 是否可选中,可选参数,默认为true
返回值
clickable
设置目标节点是否可点击
参数
- is : boolean 是否可点击,可选参数,默认为true
返回值
longClickable
设置目标节点是否可长按
参数
- is : boolean 是否可长按,可选参数,默认为true
返回值
editable
设置目标节点是否可编辑
参数
- is : boolean 是否可编辑,可选参数,默认为true
返回值
focusable
设置目标节点是否可聚焦
参数
- is : boolean 是否可聚焦,可选参数,默认为true
返回值
scrollable
设置目标节点是否可滚动
参数
- is : boolean 是否可滚动,可选参数,默认为true
返回值
selected
设置目标节点是否选中
参数
- is : boolean 是否选中,可选参数,默认为true
返回值
depth
设置目标节点的深度
参数
- min : integer 最小节点深度
- max : integer 最大节点深度,可选参数,默认为min
返回值
desc
设置目标节点的描述
参数
- str : string 描述
返回值
descContains
设置目标节点描述包含的内容
参数
- str : string 描述包含的内容
返回值
descStartsWith
设置目标节点描述开头
参数
- str : string 描述开头
返回值
descEndsWith
设置目标节点描述结尾
参数
- str : string 描述结尾
返回值
descMatches
设置目标节点描述匹配的正则表达式
参数
- str : string 正则表达式
返回值
pkg
设置目标节点的包名
参数
- str : string 包名
返回值
pkgMatches
设置目标节点包名匹配的正则表达式
参数
- pattern : string 匹配包名的正则表达式
返回值
enabled
设置目标节点是否可用
参数
- is : boolean 是否可用,可选参数,默认为true
返回值
focused
设置目标节点是否聚焦
参数
- is : boolean 是否聚焦,可选参数,默认为true
返回值
hasChile
设置目标节点是否有符合的子节点
参数
- selector : UiSelector 子节点的选择器
返回值
maxDepth
设置目标节点最大深度
参数
- depth : integer 深度
返回值
minDepth
设置目标节点最小深度
参数
- depth : integer 深度
返回值
res
设置目标节点的资源名
参数
- str : string 资源名
返回值
resMatches
设置目标节点资源名包含的内容
参数
- pattern : string 匹配资源名的正则表达式
返回值
text
设置目标节点的文本
参数
- str : string 文本
返回值
textContains
设置目标节点文本包含的内容
参数
- str : string 文本包含的内容
返回值
textMatches
设置目标节点文本匹配的正则表达式
参数
- pattern : string 匹配文本的正则表达式
返回值
textStartsWith
设置目标节点文本开头
参数
- str : string 文本开头
返回值
textEndsWith
设置目标节点文本结尾
参数
- str : string 文本结尾
返回值
hint
设置目标节点的提示
参数
- str : string 提示
返回值
hintContains
设置目标节点提示包含的内容
参数
- str : string 提示包含的内容
返回值
hintMatches
设置目标节点提示匹配的正则表达式
参数
- pattern : string 匹配提示的正则表达式
返回值
hintStartsWith
设置目标节点提示开头
参数
- str : string 提示开头
返回值
hintEndsWith
设置目标节点提示结尾
参数
- str : string 提示结尾
返回值
clazz
设置目标节点的类名
参数
- str : string 类名
返回值
clazzMatches
设置目标节点类名匹配的正则表达式
参数
- pattern : string 匹配类名的正则表达式
返回值
clazzContains
设置目标节点类名包含的内容
参数
- str : string 类名包含的内容
返回值
clazzStartsWith
设置目标节点类名开头
参数
- str : string 类名开头
返回值
clazzEndsWith
设置目标节点类名结尾
参数
- str : string 类名结尾
返回值
index
设置目标节点在父节点中的索引
参数
- index : integer 指定元素为父节点的第几个子节点,从0开始