android警告——Buttons in button bars should be border
Buttons in button bars should be borderless;
Bug起因,要写两个并排的按钮,登录按钮和注册按钮,因为没有背景图,美工在忙别的事,没空理。所以就出了这个问题
Buttons in button bars should be borderless; use style="?android:attr/buttonBarButtonStyle" (and ?android:attr/buttonBarStyle on the parent)
Issue: Ensures that buttons in button bars are borderless
Id: ButtonStyle
Button bars typically use a borderless style for the buttons. Set the style="?android:attr/buttonBarButtonStyle" attribute on each of the buttons, and set style="?android:attr/buttonBarStyle" on the parent layout
[http://developer.android.com/design/building-blocks/buttons.html]
解决办法:
Set the style="?android:attr/buttonBarButtonStyle" attribute on each of the buttons, and set style="?android:attr/buttonBarStyle" on the parent layout.
给每个Button设置style="?android:attr/buttonBarButtonStyle" 属性。同时,给父布局设置style="?android:attr/buttonBarStyle"属性。
文档看的好,大家都好。
更多相关文章
- 设置TextView文字居中
- 安卓第三天---ViewPager控件实现滑动切换图片
- Android笔记-3
- 【Android(安卓)开发】:Android五种布局的使用方法
- android背景选择器selector用法汇总
- Animator记录一次属性动画实现的逐渐出现和逐渐消失的动画
- Android自动完成文本框
- Android中ProgressBar的使用
- Android(安卓)layout xml总结