Android Listview 去除边框
2024-10-20 01:41:12
最近在做一个时间轴的功能,因为原生效果的Listview有item分隔边框,所以就需要去除边框,调用listview的setDivider方法就可以了:
listView.setDivider(null);
但是,对于我的需求来说,左边时间轴部分没有间隔是ok的,右边的一个个item之间,却需要有一个分隔线。这个也不难:
<View
android:layout_marginBottom="1px"
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="@color/general_bg_gray"
/>
只需要在item视图的下方加一条线即可,线的粗细、颜色, 自己根据需要调整即可.
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利;
本文出自:博客园--别问是谁
最新文章
- 28个你必须知道的HTML5的新特性,技巧以及技术
- .net 下判断中英文字符串长度
- rabbitMQ学习(四)
- Chinese culture
- Memory Allocation in the MySQL Server
- mysql密码忘记或者不知道,怎么办?
- HDU2088JAVA2
- hdu 4091 Zombie’s Treasure Chest(数学规律+枚举)
- 并行编程条件变量(posix condition variables)
- 使用autoconf和automake生成Makefile文件(转)
- IOS 播放视频 MPMoviePlayerController
- 70. Climbing Stairs【leetcode】递归,动态规划,java,算法
- LeetCode---Container With Most Water(11)
- form表单序列化为Jquery对象
- MM-分割评估
- .Net QQ互联教程
- centos 6.4配置samba+ldap认证
- Spring源码分析:非懒加载的单例Bean初始化过程(下)
- jenkins权限配置
- django orm 操作表
热门文章
- 重载delete时的那点事
- 重构wm_concat,采用clob做为存储容器
- Windows下如何安装 Composer
- The promises and challenges of std::async task-based parallelism in C++11 C++11 std::async/future/promise
- Android源代码装饰模式---ContextWrapper
- 折叠表格思路及遇到的问题(tableView:viewForHeaderInSection:的section从1开始,不是从0开始)
- macbook使用“终端”远程登录linux主机
- NOPcommerce研究
- 使用intelliJ IDE开发java web项目
- Linux下双网卡-双外网网关-电信联通双线主机设置