您的位置:首页 > 其它

LinearLayout设置白色背景、灰色边框、倒圆角

2014-08-28 11:48 357 查看




drawable-hdpi下面建一个xml,例如linearlayout.xml

<?xml version="1.0" encoding="utf-8"?>

<shape xmlns:android="http://schemas.android.com/apk/res/android">

<solid android:color="#ffffff" />

<stroke

android:width="0.01dp"

android:color="#bfbfbf" />

<corners android:topLeftRadius="10dp"

android:topRightRadius="10dp"

android:bottomRightRadius="10dp"

android:bottomLeftRadius="10dp"/>

</shape>

在布局文件中写:

<LinearLayout

android:orientation="vertical"

android:layout_width="0dp"

android:layout_height="90dip"

android:layout_weight="10"

android:background="@drawable/linearlayout"

>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: