码迷,mamicode.com
首页 > 其他好文 > 详细

5 状态选择器

时间:2016-04-11 18:30:18      阅读:114      评论:0      收藏:0      [点我收藏+]

标签:

技术分享
 1 在res的drawable目录下 新建xml文件   在布局文件中设置button的background属性为这个xml
 2 <?xml version="1.0" encoding="utf-8"?>
 3 <selector xmlns:android="http://schemas.android.com/apk/res/android">
 4 
 5     <item android:drawable="@drawable/function_greenbutton_pressed" android:state_pressed="true"/>
 6    
 7     <item android:drawable="@drawable/function_greenbutton_pressed" android:state_focused="true"/>
 8     
 9     <item android:drawable="@drawable/function_greenbutton_normal"/>
10 
11 </selector>
状态选择器

 

5 状态选择器

标签:

原文地址:http://www.cnblogs.com/YyuTtian/p/5379106.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!