ListView的分割线属性操作
2015-09-14 00:13
274 查看
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" />
相关文章推荐
- ContextLoaderListener作用详解
- C# readnodefile()不能读取带有文件名为汉字的osg文件解决方法
- Lucas定理+中国剩余定理 hdu5446 Unknown Treasure
- .NET基础拾遗(2)面向对象的实现和异常的处理基础
- jq 判断多个 checkbox 选中
- 想搞个快速排序,却用上了ArrayList是不是有点“邪魔外道” ……
- android-service
- iOS 网易彩票-6设置模块三(常用小功能)
- Path和classpath
- [LeetCode#244] Shortest Word Distance II
- JNI调用
- spark 最新版1.0本地模式安装_spark入门学习一
- Lintcode搜索区间
- php服务器版本更新工具up2server
- Unity3D笔记第十三天——关节、布料
- 网络操作系统和分布式操作系统的区别
- Linux中批量删除redis中的key
- [知其然不知其所以然-5] 为什么我的风扇温度很低却转不停/或者温度很高却根本不转?
- 深入浅出:进程、线程、协程、同步、异步、回调(转载)
- Google Hacking