1
我有列表项选择的形状(矩形):如何使用图像作为背景的形状?
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#eef0f3" />
<corners
android:bottomLeftRadius="4dp"
android:bottomRightRadius="4dp"
android:topLeftRadius="4dp"
android:topRightRadius="4dp" />
</shape>
它的颜色#eef0f3矩形,但我需要使用背景图片来代替:
<solid android:color="#eef0f3" />
我怎样才能做到这一点?
这可能帮助你http://stackoverflow.com/questions/21002224/add-a-background-image-to-shape-in-xml-android – Pavan