您的位置:首页 > 其它

Borderless button

2015-01-28 10:14 48 查看
读Google的文档的时候发现的这个,想起来,我之前在即时通讯项目是这样干的,直接在button的xml属性中指定下面的属性:

android:background=null;

One design that can be useful is a "borderless" button. Borderless buttons resemble basic buttons except that they have no borders or background but still change appearance during different states, such as when clicked.

To create a borderless button, apply the
borderlessButtonStyle
style
to the button. For example:
当使用无缝隙的button的时候,当他的state改变的时候,其appearance 回随着其一起改变。
<Button
    android:id="@+id/button_send"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/button_send"
    android:onClick="sendMessage"
    style="?android:attr/borderlessButtonStyle" />




获取焦点时:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: