Android编程简单设置ListView分割线的方法
作者:Jacob-wj 时间:2021-07-21 20:24:33
本文实例讲述了Android编程简单设置ListView分割线的方法。分享给大家供大家参考,具体如下:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ListView
android:id="@+id/android:list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:divider="#FFCC00"
android:dividerHeight="4px"/>
</LinearLayout>
关键是这两句:
Android:divider="#FFCC00"
android:dividerHeight="4px"
前一句是设置分割线的颜色,后一句是设置分割线高(即分割线的粗细)
希望本文所述对大家Android程序设计有所帮助。
标签:Android,ListView,分割线
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
C#中ExecuteNonQuery()返回值注意点分析
2023-04-05 03:40:14
Java中构造、生成XML简明教程
2021-10-03 09:33:58
谈谈为JAXB和response设置编码,解决wechat4j中文乱码的问题
2023-07-31 01:34:27
![](https://img.aspxhome.com/file/2023/1/57621_0s.png)
C# 中 System.Index 结构体和 Hat 运算符(^)的使用示例
2023-02-27 11:40:23
详解在LINUX上部署带有JAR包的JAVA项目
2022-12-30 21:07:14
![](https://img.aspxhome.com/file/2023/7/78427_0s.png)
浅谈c#.net中巧用ToString()将日期转成想要的格式
2022-02-02 18:14:07
JAVA遍历Map集合的几种方法汇总
2021-09-01 12:34:07
Java多线程 线程组原理及实例详解
2022-11-26 02:51:40
![](https://img.aspxhome.com/file/2023/5/85535_0s.png)
如何利用C#正则表达式判断是否是有效的文件及文件夹路径
2022-03-06 23:34:45
Kotlin 使用Lambda来设置回调的操作
2021-07-22 03:08:04
![](https://img.aspxhome.com/file/2023/3/96033_0s.jpg)
教你怎么用Java获取国家法定节假日
2021-05-24 01:16:04
Java实现Android拼图游戏设计过程解析
2021-10-02 17:13:18
![](https://img.aspxhome.com/file/2023/2/94232_0s.png)
java的Arrays工具类实战
2023-08-21 15:46:36
![](https://img.aspxhome.com/file/2023/6/58076_0s.png)
SpringCloud Eureka搭建的方法步骤
2021-10-10 11:03:29
![](https://img.aspxhome.com/file/2023/1/61241_0s.jpg)
c# 将Datatable数据导出到Excel表格中
2023-12-26 02:03:53
Java图论进阶之最小生成树算法详解
2022-05-28 12:17:54
![](https://img.aspxhome.com/file/2023/4/60464_0s.jpg)
使用Java读取Word文件的简单例子分享
2022-12-17 02:15:19
![](https://img.aspxhome.com/file/2023/8/87358_0s.png)
Unity3D基于UGUI实现虚拟摇杆
2023-03-15 15:42:37
![](https://img.aspxhome.com/file/2023/9/100229_0s.jpg)
Spring Bean实例的创建及构造器的挑选
2021-08-02 09:35:57
mybatis 多表关联mapper文件写法操作
2021-12-02 23:21:25