Android开发----ListView去掉默认分割线 并且加上圆角
2017-10-26 15:34
609 查看
1.divider设置为@null
[html] view
plain copy
<ExpandableListView
android:id="@+id/lv_content"
android:layout_width="match_parent"
<span style="background-color: rgb(204, 0, 0);">android:divider="@null"</span>
android:layout_height="match_parent" >
</ExpandableListView>
2.divider设置颜色#00000000
[html] view
plain copy
<ExpandableListView
android:id="@+id/lv_content"
android:layout_width="match_parent"
<span style="background-color: rgb(204, 0, 0);">android:divider="#00000000"</span>
android:layout_height="match_parent" >
</ExpandableListView>
3.设置圆角的办法
在drawable目录下添加borad_radio.xml,设置控件的边框代码。如下:
调用样式只要设置控件的android:background="@drawable/border_radio" 即可
效果如下图
[html] view
plain copy
<ExpandableListView
android:id="@+id/lv_content"
android:layout_width="match_parent"
<span style="background-color: rgb(204, 0, 0);">android:divider="@null"</span>
android:layout_height="match_parent" >
</ExpandableListView>
2.divider设置颜色#00000000
[html] view
plain copy
<ExpandableListView
android:id="@+id/lv_content"
android:layout_width="match_parent"
<span style="background-color: rgb(204, 0, 0);">android:divider="#00000000"</span>
android:layout_height="match_parent" >
</ExpandableListView>
3.设置圆角的办法
在drawable目录下添加borad_radio.xml,设置控件的边框代码。如下:
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <solid android:color="#CE0000"/> <corners android:radius="6dp" /> </shape>
调用样式只要设置控件的android:background="@drawable/border_radio" 即可
效果如下图
相关文章推荐
- [置顶] android开发之 listview中的item去掉分割线 隐藏分割线
- android开发之 listview中的item去掉分割线 隐藏分割线
- android listview去掉分割线 && 去除或替换listview 默认的点击选中时的颜色
- android开发之 listview中的item去掉分割线 隐藏分割线
- Windows 10 UWP开发:如何去掉ListView默认的选中效果
- Android技巧:ListView去掉默认橙黄底色
- Android开发 ListView底部分割线不显示的解决办法
- android listview去掉分割线 和 颜色值 以及上边和下边黑色阴影
- [置顶] Android开发之去掉listview的点击效果,一行代码间接粗暴,解决你的问题。
- Android listView 去掉header和footer中的分割线
- Android中ListView实现图文并列并且自定义分割线(完善仿微信APP)
- Android开发学习之快速实现圆角ListView
- android listview去掉分割线
- 详解Android中ListView实现图文并列并且自定义分割线(完善仿微信APP)
- Android 以Dialog的方式显示Activity,并且处理背景四个角为圆角,去掉黑角
- android listview去掉分割线
- Android 源码开发去掉弹出的默认程序。
- android searchView 去掉默认下划线 改为圆角搜索框
- Android 去掉ListView的HeaderView、FooterView的Divider分割线
- android listview 去掉item分割线