1,solid
-
solid用以指定内部填充色
-
它只有一个属性color
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="color"/> //内部填充色
</shape>
2,Demo
【1】实现效果
【2】实现代码
-
在res/drawable文件夹下定义Shape文件
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<solid android:color="#ffff00"/>
</shape>
-
布局文件中的View 使用background 调用资源文件
<RelativeLayout xmlns:android="