首页 > 系统 > Android > 正文

Android编程简单设置ListView分割线的方法

2019-10-23 19:46:22
字体:
来源:转载
供稿:网友

本文实例讲述了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开发频道。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表