您的位置:首页 > 移动开发 > Android开发

android 控件自定义样式

2016-07-15 10:44 316 查看
一、按钮(Button)方式1.存在.9图片或图片时可在drawable文件夹下新建xml文件style_button_one.xml,代码如下
<?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/login_active" />
<item android:drawable="@drawable/login" />
</selector>

方式二.自己动手画
http://blog.csdn.net/wswqiang/article/details/6616306

使用时在控件中使用 android:background="@drawable/style_button_one"


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