快速开发之01——button的按钮效果
2014-07-26 18:02
127 查看
这一章非常基础,也是很人新手会用到的一端代码,让你的按钮不再单调
不说多了贴代码
先贴button_select的代码
让我们先来看看两个效果图
相信大家看出来了有啥不同,其实大家可以看到别人的APP有些按钮漂亮可以逆向破解出来 把图片收藏起来 图片是.9的格式
不说多了贴代码
<Button android:background="@drawable/button_select" android:id="@+id/ok" android:layout_width="140dip" android:layout_height="wrap_content" android:text="确定" /> <Button android:background="@drawable/button_select" android:id="@+id/cancel" android:layout_width="140dip" android:layout_height="wrap_content" android:text="取消" />
</pre><pre name="code" class="java">其中button的属性有一个background设置一个xml文件 button_select 将两个效果图引入 点击就会有效果了
先贴button_select的代码
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@drawable/function_greenbutton_pressed" /> <!-- pressed --> <item android:state_focused="true" android:drawable="@drawable/function_greenbutton_pressed" /> <!-- focused --> <item android:drawable="@drawable/function_greenbutton_normal" /> <!-- default --> </selector>
让我们先来看看两个效果图
相信大家看出来了有啥不同,其实大家可以看到别人的APP有些按钮漂亮可以逆向破解出来 把图片收藏起来 图片是.9的格式
相关文章推荐
- ios开发学习--按钮(Button)效果源码分享--系列教程1
- ios开发学习--按钮(Button)效果源码分享--系列教程2
- ios开发学习--按钮(Button)效果源码分享
- ios开发学习--按钮(Button)效果源码分享--系列教程2
- ios开发学习--按钮(Button)效果源码分享--系列教程2
- ios开发学习--按钮(Button)效果源码分享--系列教程2
- ios开发学习--按钮(Button)效果源码分享
- ios开发学习--按钮(Button)效果源码分享--系列教程1
- ios开发学习--按钮(Button)效果源码分享--系列教程3
- Android中ImageButton自定义按钮的按下效果的代码实现方法,附网上2种经典解决方法。
- button_press.xml 按钮点击/未点击 两个不同效果
- 分享一个快速开发动态互动HTML5可视化图形效果的Javascript类库 - Envisio...
- 超炫button按钮动画效果
- 《用水晶报表快速开发VB信息管理系统》开放实验结业学习效果与建议反馈表
- UI效果(4): Button的那点事_01
- android 开发-捕捉按钮的触发(Button 动作)
- 超炫button按钮动画效果
- 超炫button按钮动画效果
- 常用控件 01 按钮 Button
- 快速开发平台ES2007在UISCRIPT数据列表插入自定义按钮及按钮事件|JAVA开发平台|web开发平台