<?xml version="1.0" encoding="utf-8" ?> android:state_window_focused="true"  android:state_enabled="true" android:state_checkable="true" android:state_checked="true" android:state_selected="true" android:state_pressed="true"                                                                     android:state_activated="true" android:state_active="true" android:state_single="true" android:state_first="true" android:state_middle="true" android:state_last="true" android:state_accelerated="true" android:state_hovered="true" android:state_drag_hovered="true" android:state_drag_can_accept="true" android:state_accessibility_focused="true" android:drawable="@drawable/icon" />   

接下来,给出部分使用场景
<?xml version="1.0" encoding="utf-8" ?>                                          

当然我们也可以这样
<?xml version="1.0" encoding="utf-8"?>                

或者这样
<?xml version="1.0" encoding="utf-8"?>                                                                                                                                                                    默认背景

这里我们给出重点提醒selector  一般用于background 不要忘记
android:background="@drawable/you_drawable_xml_name"


更多相关文章

  1. Android系统自带样式(android:theme)
  2. Android系统自带样式(android:theme)
  3. Android(安卓)Shape属性
  4. Android系统自带样式(android:theme)
  5. Android系统自带样式---android:theme
  6. Android系统自带样式---android:theme
  7. Android系统自带样式---android:theme
  8. Linux常用命令大全(最完整)
  9. 40个常用Linux命令

随机推荐

  1. android studio启动一直卡在fetching And
  2. 解决Android启动显示空白界面的问题,自定
  3. Viewpager2—登录注册引导页面
  4. Android(安卓)自定义 RadioButton 去除无
  5. 关于 Android合并分区的问题
  6. Android(安卓)Studio安装配置详细步骤(超
  7. Android(安卓)定位GPS的使用
  8. 2020年GitHub标星2.9K的Android基础——
  9. Android(安卓)style & Theme 再探析(一)
  10. Hi,腾讯WeTest限免开放Android(安卓)Oreo