http://blog.csdn.net/dekunchenivan/article/details/6640804

在Android布局文件layout中设置水平分割线:
<View
android:layout_width="fill_parent"
android:layout_height="1px"
android:background="?android:attr/listDivider"
/>

在Android布局文件layout中设置垂直分割线:
<View
android:layout_width="1px"
android:layout_height="fill_parent"
android:background="?android:attr/listDivider"
/>

设置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"

前一句是设置分割线的颜色,后一句是设置分割线高(即分割线的粗细)

更多相关文章

  1. Android:控件的隐藏显示失效了
  2. 最近总结的android疑惑
  3. cc
  4. My Android(安卓)Camera Notes
  5. Android(安卓)SDK 更新失败解决 Failed to fetch URL https://dl
  6. Android下修改ImageButton样式
  7. 设置控件不可点击
  8. android gps开发
  9. Android(安卓)GPS 开发

随机推荐

  1. Android(安卓)应用保存状态
  2. mk中的android:sharedUserId和LOCAL_CERT
  3. 在程序中设置android:gravity 和 android
  4. Android RelativeLayout属性
  5. Android 官方命令深入分析之android
  6. Android在走下坡路吗?
  7. Android音频开发(5):Mp3的录制 - 编译Lame源
  8. android高级应用课程
  9. android 文件读取
  10. android adb 命令