方法一、
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/black"/>
注:存在缺点会增加布局绘制时间
方法二、
使用方法
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:showDividers="middle|end|beginning|none"
android:divider="@drawable/layout_line">
<LinearLayout/>
分割线
@drawable/layout_line
<?xml version=“1.0” encoding="utf-8"
<shape xmlns:android=“http://schemas.android.com/apk/res/android”>
<solid android:color="@Color/person_back"/>
<size android:height="1dip"/>
直接使用即可
最后
以上就是刻苦夏天最近收集整理的关于android LinearLayout添加分割线的全部内容,更多相关android内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复