点击ListView时背景阴影
2016-07-21 18:04
155 查看
只需要在ListView的item里面父控件添加一个选择器 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/list_item_selector" > *********************************************************** </RelativeLayout> <item android:drawable="@color/item_bg" android:state_pressed="true"/> <color name="item_bg">#dfdfdf</color> <!-- 条目背景 --> <item android:drawable="@color/white"/> <color name="white">#FFFFFF</color>
相关文章推荐
- 异步缓存,异步加载
- 小问题大脑洞
- [算法学习笔记]冒泡排序和选择排序
- WebStorm的基本配置
- CodeForces 615A Bulbs (水。)
- jasmine单元测试
- 日历中的星期一问题
- 从线程返回信息
- UDP 多线程 通讯协议
- Java 程序员应会的 Linux 命令
- MySQL crash-safe replication
- 未关闭InputStream 引起的血案
- Android基础之Activity四种启动模式
- java中的 private Logger log=Logger.getLogger(this.getClass());
- c++学习笔记(十一):C++类的访问修饰符
- 数据结构实验之数组一:矩阵转置
- JavaScript的垃圾回收
- shell初步学习
- sql
- CodeForces 597A Divisibility