android 布局边框
16lz
2021-01-23
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/content_bg"
android:paddingBottom="10dp">
</RelativeLayout>
drawable/content_bg.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<stroke android:width="1px" android:color="#E0E0E0" /><!--边框颜色-->
<solid android:color="#FFFCFCFC" /><!--填充色-->
<corners android:radius="4dp" />
</shape>
</item>
</layer-list>
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/content_bg"
android:paddingBottom="10dp">
</RelativeLayout>
drawable/content_bg.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape>
<stroke android:width="1px" android:color="#E0E0E0" /><!--边框颜色-->
<solid android:color="#FFFCFCFC" /><!--填充色-->
<corners android:radius="4dp" />
</shape>
</item>
</layer-list>
更多相关文章
- Android 设置颜色的方法总结
- Android实现透明的颜色效果(zz)
- Android实现透明的颜色效果
- Android更改ProgressBar颜色
- 修改光标颜色
- Android设置颜色的几种方法
- shape带边框的背景
- android 设置各种颜色 android:background="@color/white"