我想要改变ListView分行的线条的颜色。但是不知道怎么做,想来问一下,怎么来实现?
谢谢
如何改变AndroidListView分行的线条颜色?
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
3条回答
- 漫随风起 2012-09-28 03:16关注
你可以在一个布局的xml文件中用android:divider="#FF0000"设置颜色值。当你修改的时候你也可以设置/重新设置分割线条的高度。
<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>
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报