有图有真相!绝不含糊!
还是挺美观的吧?完全没用图片资源
再来看一下代码,主要是用xml实现的(代码见传送门: http://download.csdn.net/detail/u013127097/6996029)
右边无边框的button_style(分别有normal、selete状态):
left_while_borde_rounded.xml
left_while_borde_rounded_focused.xml
左边无边框的button_style(分别有normal、selete状态):
right_while_borde_rounded.xml
yellow_borde_rounded.xml
yellow_borde_rounded_focused.xml
再看activity_main.xml的布局,分别添加上面三种风格的按钮
最后在Activity中添加按钮事件
代码见传送门: http://download.csdn.net/detail/u013127097/6996029