按钮-button
按钮控件{XButton}是属于{XView}的子控件,因此{XView}中的所有方法,按钮控件都可以调用。
按钮是界面的最简单的元素,一般用于点击操作。

其实按钮本身是没有点击事件的,由于它继承了父类{XView},因此可以调用其父类中的函数来实现点击操作。
事实上,所有的组件都是继承自{XView}的,因此都可以调用{XView}中的方法。















设置重力
参数 : gravity {String} 例如:"center|bottom"
设置字体
参数 : typeface {int} 字体类型(使用AgUi中的常量,例如:$ui.BOLD)
设置主题颜色
参数 : color {int} 颜色
设置主题颜色
参数 : color {String} 颜色
设置文字
参数 : text {String} 文字
获得文字
如果获取的文本为null则会返回空字符串
返回 : {String} 文字
设置文字颜色
参数 : color {String} 颜色
设置文字颜色
参数 : color {int} 颜色
设置涟漪颜色
参数 : color {int} 颜色
设置涟漪颜色
参数 : color {string} 颜色
设置弧度
参数 : radius {int} 弧度
设置字体大小
参数 : size {float} 字体大小
设置图标
参数 : icon {string} 图标
设置图标颜色
参数 : color {int} 图标颜色
设置图标颜色
参数 : color {string} 图标颜色
设置图标尺寸
参数 : size {int} 图标尺寸
设置图标内边距
参数 : padding {int} 设置图标内边距