AutoLua2AutoLua2
  • 快速开始
  • 介绍
  • 自动化API

    • 图色相关
    • 模拟相关
    • 节点相关
    • 界面相关
    • 其他
  • 界面API
  • 快速开始
  • 介绍
  • 自动化API

    • 图色相关
    • 模拟相关
    • 节点相关
    • 界面相关
    • 其他
  • 界面API
  • 自动化API

    • 图色相关

      • 全局
      • Bitmap
      • FindOrder
    • 模拟相关

      • 全局
      • Pointer
      • KeyCode
    • 节点相关

      • 全局
      • UiObject
      • UiSelector
    • 交互相关

      • 全局
      • UI
      • FloatView
      • FloatController
      • LayoutParams
      • LayoutParamsFlag
    • 其他
  • UI的API

    • 全局变量
    • 视图

      • View 类
      • window 类
      • Label 类
      • ImageButton 类
      • EditTextView 类
      • ScrollView 类
      • LinearLayout 类
      • Alert 类
      • Toast 类
      • Dialog 类
      • Switch 类
      • TabSegmentView 类
      • TableView 类
      • TableViewAdapter 类
      • TableViewAutoFitAdapter 类
      • CollectionView 类
      • CollectionViewAdapter 类
      • CollectionViewAutoFitAdapter 类
      • CollectionViewLayout 类
      • WaterfallView 类
      • WaterfallAdapter 类
      • WaterfallLayout 类
      • ViewPager 类
      • ViewPagerAdapter 类
    • 动画
    • 数据

      • Map 类
      • Array 类
      • Point 类
      • Size 类
      • Rect 类
      • Color 类
      • StyleString 类
    • 工具

      • Loading 类
      • Http 类
      • System 类
      • Timer 类
      • MBit 类
      • File 类
      • Application 类
      • Navigator 类
      • PreferenceUtils 类
      • TypeUtils 类
      • StringUtil 类
      • NetworkReachability 类
      • GlobalEvent 类
      • Clipboard 类
      • CornerManager 类
    • 枚举

      • ContentMode 枚举
      • TextAlign 枚举
      • BreakMode 枚举
      • FontStyle 枚举
      • UnderlineStyle 枚举
      • RepeatType 枚举
      • InterpolatorType 枚举
      • AnimType 枚举
      • EditTextViewInputMode 枚举
      • ReturnType 枚举
      • ScrollDirection 枚举
      • StatusBarStyle 枚举
      • RectCorner 枚举
      • LinearType 枚举
      • Gravity 枚举
      • MeasurementType 枚举
      • ValueType 枚举
      • GradientType 枚举
      • TabSegmentAlignment 枚举
      • NetworkState 枚举
      • CachePolicy 枚举
      • ResponseKey 枚举
      • ErrorKey 枚举
      • EncType 枚举

UiSelector 类

节点选择器,通过设置节点的属性来选择节点

方法

checkable

设置目标节点是否可选中

参数

  • is : boolean 是否可选中,可选参数,默认为true

返回值

  • : UiSelector

clickable

设置目标节点是否可点击

参数

  • is : boolean 是否可点击,可选参数,默认为true

返回值

  • : UiSelector

longClickable

设置目标节点是否可长按

参数

  • is : boolean 是否可长按,可选参数,默认为true

返回值

  • : UiSelector

editable

设置目标节点是否可编辑

参数

  • is : boolean 是否可编辑,可选参数,默认为true

返回值

  • : UiSelector

focusable

设置目标节点是否可聚焦

参数

  • is : boolean 是否可聚焦,可选参数,默认为true

返回值

  • : UiSelector

scrollable

设置目标节点是否可滚动

参数

  • is : boolean 是否可滚动,可选参数,默认为true

返回值

  • : UiSelector

selected

设置目标节点是否选中

参数

  • is : boolean 是否选中,可选参数,默认为true

返回值

  • : UiSelector

depth

设置目标节点的深度

参数

  • min : integer 最小节点深度
  • max : integer 最大节点深度,可选参数,默认为min

返回值

  • : UiSelector

desc

设置目标节点的描述

参数

  • str : string 描述

返回值

  • : UiSelector

descContains

设置目标节点描述包含的内容

参数

  • str : string 描述包含的内容

返回值

  • : UiSelector

descStartsWith

设置目标节点描述开头

参数

  • str : string 描述开头

返回值

  • : UiSelector

descEndsWith

设置目标节点描述结尾

参数

  • str : string 描述结尾

返回值

  • : UiSelector

descMatches

设置目标节点描述匹配的正则表达式

参数

  • str : string 正则表达式

返回值

  • : UiSelector

pkg

设置目标节点的包名

参数

  • str : string 包名

返回值

  • : UiSelector

pkgMatches

设置目标节点包名匹配的正则表达式

参数

  • pattern : string 匹配包名的正则表达式

返回值

  • : UiSelector

enabled

设置目标节点是否可用

参数

  • is : boolean 是否可用,可选参数,默认为true

返回值

  • : UiSelector

focused

设置目标节点是否聚焦

参数

  • is : boolean 是否聚焦,可选参数,默认为true

返回值

  • : UiSelector

hasChile

设置目标节点是否有符合的子节点

参数

  • selector : UiSelector 子节点的选择器

返回值

  • : UiSelector

maxDepth

设置目标节点最大深度

参数

  • depth : integer 深度

返回值

  • : UiSelector

minDepth

设置目标节点最小深度

参数

  • depth : integer 深度

返回值

  • : UiSelector

res

设置目标节点的资源名

参数

  • str : string 资源名

返回值

  • : UiSelector

resMatches

设置目标节点资源名包含的内容

参数

  • pattern : string 匹配资源名的正则表达式

返回值

  • : UiSelector

text

设置目标节点的文本

参数

  • str : string 文本

返回值

  • : UiSelector

textContains

设置目标节点文本包含的内容

参数

  • str : string 文本包含的内容

返回值

  • : UiSelector

textMatches

设置目标节点文本匹配的正则表达式

参数

  • pattern : string 匹配文本的正则表达式

返回值

  • : UiSelector

textStartsWith

设置目标节点文本开头

参数

  • str : string 文本开头

返回值

  • : UiSelector

textEndsWith

设置目标节点文本结尾

参数

  • str : string 文本结尾

返回值

  • : UiSelector

hint

设置目标节点的提示

参数

  • str : string 提示

返回值

  • : UiSelector

hintContains

设置目标节点提示包含的内容

参数

  • str : string 提示包含的内容

返回值

  • : UiSelector

hintMatches

设置目标节点提示匹配的正则表达式

参数

  • pattern : string 匹配提示的正则表达式

返回值

  • : UiSelector

hintStartsWith

设置目标节点提示开头

参数

  • str : string 提示开头

返回值

  • : UiSelector

hintEndsWith

设置目标节点提示结尾

参数

  • str : string 提示结尾

返回值

  • : UiSelector

clazz

设置目标节点的类名

参数

  • str : string 类名

返回值

  • : UiSelector

clazzMatches

设置目标节点类名匹配的正则表达式

参数

  • pattern : string 匹配类名的正则表达式

返回值

  • : UiSelector

clazzContains

设置目标节点类名包含的内容

参数

  • str : string 类名包含的内容

返回值

  • : UiSelector

clazzStartsWith

设置目标节点类名开头

参数

  • str : string 类名开头

返回值

  • : UiSelector

clazzEndsWith

设置目标节点类名结尾

参数

  • str : string 类名结尾

返回值

  • : UiSelector

index

设置目标节点在父节点中的索引

参数

  • index : integer 指定元素为父节点的第几个子节点,从0开始

返回值

  • : UiSelector
Prev
UiObject