自定义ListView中的分割线
2016-01-12 18:28
232 查看
ListView中每个Item项之间都有分割线,设置android:footerDividersEnabled表示是否显示分割线,此属性默认为true。
1.不显示分割线只要在ListView控件中添加android:footerDividersEnabled="false"即可。
[html] view
plaincopy
<ListView
android:id="@+id/local_groups_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:footerDividersEnabled="false" />
2.改变ListView的分割线颜色和宽度,需要在布局中定义android:divider和android:dividerHeight属性。
[html] view
plaincopy
<ListView
android:id="@+id/local_groups_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@color/divider_color"
android:dividerHeight="1px" />
1.不显示分割线只要在ListView控件中添加android:footerDividersEnabled="false"即可。
[html] view
plaincopy
<ListView
android:id="@+id/local_groups_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:footerDividersEnabled="false" />
2.改变ListView的分割线颜色和宽度,需要在布局中定义android:divider和android:dividerHeight属性。
[html] view
plaincopy
<ListView
android:id="@+id/local_groups_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@color/divider_color"
android:dividerHeight="1px" />
相关文章推荐
- NoSQL数据库四大类型解析
- python数字图像处理(10):图像简单滤波
- Spring-MVC配置方法
- js打印---我传给肖方username和userpassword,他在后端处理完成,返回给我。
- 使用SPRING 中ROWMAPPER
- Android Studio分享项目到GitHub
- 旋转矩阵、欧拉角、四元数比较
- JQuery前端技术记录
- 面向对象设计思想:面向对象设计的基本原则
- android5.1 编译命令
- graphlab
- endsWith和startsWith同样效果其他形式的写法(2016.1.12)
- 机器学习之增强学习
- Unity3D游戏开发之如何发布Android游戏
- POJ 3320 Jessica's Reading Problem(尺取法)
- JDK 7 中的 Fork/Join 模式 简单入门
- 集中管理工具Puppet 实战部署及使用
- 自定义控件(一) EditText自定义
- Xcode6中去掉默认的Main.storyboard
- 驱动模块加载错误:insmod: can't insert 'xx.ko': invalid module format