1. 说明

按钮

2. 使用示例

 <Button android:layout_height="wrap_parent"
             android:layout_width="match_parent"
             android:tag="btn"
             android:text="按钮"
             android:textColor="#669999"
             android:textSize="14dp"
             android:gravity="center"
/>

3. 属性说明

3.1. 公有属性

请参考 公有属性

3.2. 私有属性

属性名 说明 可选值
layout_weight 子元素权重 数字
当父级为LinearLayout的时候,子控件可以设置权重
gravity 内部的控件对齐方式 用法参考
top
bottom
left
right
center_vertical
fill_vertical
center_horizontal
fill_horizontal
center
fill
clip_vertical
clip_horizontal
text 按钮文字 字符串
textColor 文字颜色 16进制,例如#FFFFFF
textSize 文字大小 具体数字+dp
maxLength 文字最大长度 具体数字

results matching ""

    No results matching ""