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
to the button. For example:
当使用无缝隙的button的时候,当他的state改变的时候,其appearance 回随着其一起改变。
获取焦点时:
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
borderlessButtonStylestyle
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" />
获取焦点时:
相关文章推荐
- 解决编译出现TextAppearance.Material.Widget.Button.Borderless.Colored not found的问题
- Android中Button控件警告信息Buttons in button bars should be borderless
- Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?an
- Buttons in button bars should be borderless
- Android中Button控件Buttons in button bars should be borderless;警告信息
- Buttons in button bars should be borderless
- Android 实现borderless的Button并设置分界线
- Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?an
- selectableItemBackgroundBorderless 无效的问题
- 小程序 button 消除自带border-radius
- 微信小程序: 设置 Button 边框 border
- Silverlight中的Border,Button学习
- mac下borderless的window(无标题栏)如何实现
- IE里button设置border:none属性无效解决方法
- No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderl
- ?selectableItemBackgroundBorderless遇到的问题
- JToggleButton BasicArrowButton JPanel.setBorder()
- pyqt4 borderless window
- 微信小程序 —— button按钮去除border边框
- CSS中button标签自带border属性