我是靠谱客的博主 刻苦夏天,这篇文章主要介绍android LinearLayout添加分割线,现在分享给大家,希望可以做个参考。

方法一、

   <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内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(93)

评论列表共有 0 条评论

立即
投稿
返回
顶部